pub struct CollectionConfig {
pub dimension: usize,
pub metric: DistanceMetric,
pub sync_mode: SyncMode,
}Expand description
Configuration for a collection.
Fields§
§dimension: usizeDimensionality of vectors.
metric: DistanceMetricDistance metric.
sync_mode: SyncModeWAL sync mode.
Implementations§
Source§impl CollectionConfig
impl CollectionConfig
Sourcepub fn new(dimension: usize, metric: DistanceMetric) -> CollectionConfig
pub fn new(dimension: usize, metric: DistanceMetric) -> CollectionConfig
Creates a new config with the given dimension and metric.
Sourcepub fn with_sync_mode(self, mode: SyncMode) -> CollectionConfig
pub fn with_sync_mode(self, mode: SyncMode) -> CollectionConfig
Sets the sync mode. Chainable.
Trait Implementations§
Source§impl Clone for CollectionConfig
impl Clone for CollectionConfig
Source§fn clone(&self) -> CollectionConfig
fn clone(&self) -> CollectionConfig
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 moreAuto Trait Implementations§
impl Freeze for CollectionConfig
impl RefUnwindSafe for CollectionConfig
impl Send for CollectionConfig
impl Sync for CollectionConfig
impl Unpin for CollectionConfig
impl UnwindSafe for CollectionConfig
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