pub struct CvxConfig {
pub server: ServerConfig,
pub storage: StorageConfig,
pub index: IndexConfig,
pub analytics: AnalyticsConfig,
pub logging: LoggingConfig,
}Expand description
Top-level ChronosVector configuration.
Deserialized from config.toml. All sections are optional with defaults.
§Example
use std::path::PathBuf;
use cvx_core::CvxConfig;
let config: CvxConfig = toml::from_str(r#"
[server]
host = "0.0.0.0"
port = 8080
[storage]
data_dir = "./data"
[logging]
level = "info"
"#).unwrap();
assert_eq!(config.server.port, 8080);
assert_eq!(config.storage.data_dir, PathBuf::from("./data"));Fields§
§server: ServerConfigServer network configuration.
storage: StorageConfigStorage engine configuration.
index: IndexConfigIndex (ST-HNSW) configuration.
analytics: AnalyticsConfigAnalytics engine configuration.
logging: LoggingConfigLogging and observability configuration.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CvxConfig
impl<'de> Deserialize<'de> for CvxConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for CvxConfig
Auto Trait Implementations§
impl Freeze for CvxConfig
impl RefUnwindSafe for CvxConfig
impl Send for CvxConfig
impl Sync for CvxConfig
impl Unpin for CvxConfig
impl UnwindSafe for CvxConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more