pub struct CollectionSchema { /* private fields */ }Expand description
Schema for a collection defining which vectors are expected.
A collection schema defines the named vectors that points in the collection should have. Each vector has a name and configuration (type, dimension).
Implementations§
Source§impl CollectionSchema
impl CollectionSchema
Sourcepub fn with_vector(self, name: impl Into<String>, config: VectorConfig) -> Self
pub fn with_vector(self, name: impl Into<String>, config: VectorConfig) -> Self
Add a vector to the schema.
Sourcepub fn get_vector(&self, name: &str) -> Option<&VectorConfig>
pub fn get_vector(&self, name: &str) -> Option<&VectorConfig>
Get the configuration for a vector by name.
Sourcepub fn vectors(&self) -> &HashMap<String, VectorConfig>
pub fn vectors(&self) -> &HashMap<String, VectorConfig>
Get all vector configurations.
Trait Implementations§
Source§impl Clone for CollectionSchema
impl Clone for CollectionSchema
Source§fn clone(&self) -> CollectionSchema
fn clone(&self) -> CollectionSchema
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 CollectionSchema
impl Debug for CollectionSchema
Source§impl Default for CollectionSchema
impl Default for CollectionSchema
Source§impl<'de> Deserialize<'de> for CollectionSchema
impl<'de> Deserialize<'de> for CollectionSchema
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
Source§impl PartialEq for CollectionSchema
impl PartialEq for CollectionSchema
Source§impl Serialize for CollectionSchema
impl Serialize for CollectionSchema
impl Eq for CollectionSchema
impl StructuralPartialEq for CollectionSchema
Auto Trait Implementations§
impl Freeze for CollectionSchema
impl RefUnwindSafe for CollectionSchema
impl Send for CollectionSchema
impl Sync for CollectionSchema
impl Unpin for CollectionSchema
impl UnwindSafe for CollectionSchema
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