pub struct MemoryConfig {
pub initial_capacity: usize,
pub max_vectors_per_index: Option<usize>,
pub enable_approximate: bool,
pub memory_threshold_mb: Option<usize>,
}
Expand description
Memory storage configuration
Fields§
§initial_capacity: usize
Initial capacity for indexes
max_vectors_per_index: Option<usize>
Maximum number of vectors per index
enable_approximate: bool
Enable approximate search for large datasets
memory_threshold_mb: Option<usize>
Memory usage threshold for triggering cleanup
Implementations§
Source§impl MemoryConfig
impl MemoryConfig
Sourcepub fn with_initial_capacity(self, capacity: usize) -> Self
pub fn with_initial_capacity(self, capacity: usize) -> Self
Set initial capacity
Sourcepub fn with_max_vectors(self, max_vectors: usize) -> Self
pub fn with_max_vectors(self, max_vectors: usize) -> Self
Set maximum vectors per index
Sourcepub fn with_approximate_search(self, enable: bool) -> Self
pub fn with_approximate_search(self, enable: bool) -> Self
Enable approximate search
Sourcepub fn with_memory_threshold(self, threshold_mb: usize) -> Self
pub fn with_memory_threshold(self, threshold_mb: usize) -> Self
Set memory threshold
Trait Implementations§
Source§impl Clone for MemoryConfig
impl Clone for MemoryConfig
Source§fn clone(&self) -> MemoryConfig
fn clone(&self) -> MemoryConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MemoryConfig
impl Debug for MemoryConfig
Auto Trait Implementations§
impl Freeze for MemoryConfig
impl RefUnwindSafe for MemoryConfig
impl Send for MemoryConfig
impl Sync for MemoryConfig
impl Unpin for MemoryConfig
impl UnwindSafe for MemoryConfig
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