pub struct Config {
pub data_dir: PathBuf,
pub enable_compression: bool,
pub enable_vector_search: bool,
pub max_connections: usize,
pub connection_timeout: u64,
pub request_timeout: u64,
pub max_document_size: usize,
pub enable_replication: bool,
pub replication_endpoints: Vec<String>,
}Expand description
AvilaDB Configuration
Fields§
§data_dir: PathBufData directory for storage
enable_compression: boolEnable compression (LZ4)
enable_vector_search: boolEnable vector search
max_connections: usizeMaximum connections
connection_timeout: u64Connection timeout (seconds)
request_timeout: u64Request timeout (seconds)
max_document_size: usizeMaximum document size (bytes)
enable_replication: boolEnable multi-region replication
replication_endpoints: Vec<String>Replication endpoints
Implementations§
Source§impl Config
impl Config
Sourcepub fn with_data_dir(self, dir: impl Into<PathBuf>) -> Self
pub fn with_data_dir(self, dir: impl Into<PathBuf>) -> Self
Set data directory
Sourcepub fn with_compression(self, enabled: bool) -> Self
pub fn with_compression(self, enabled: bool) -> Self
Enable compression
Sourcepub fn with_vector_search(self, enabled: bool) -> Self
pub fn with_vector_search(self, enabled: bool) -> Self
Enable vector search
Sourcepub fn with_max_connections(self, max: usize) -> Self
pub fn with_max_connections(self, max: usize) -> Self
Set maximum connections
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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