pub struct VectorIndex {
pub name: String,
pub collection: String,
pub fields: Vec<VectorField>,
}Expand description
MongoDB Atlas Search index definition for vectors.
Fields§
§name: StringIndex name.
collection: StringCollection name.
fields: Vec<VectorField>Vector field definitions.
Implementations§
Source§impl VectorIndex
impl VectorIndex
Sourcepub fn new(
name: impl Into<String>,
collection: impl Into<String>,
) -> VectorIndexBuilder
pub fn new( name: impl Into<String>, collection: impl Into<String>, ) -> VectorIndexBuilder
Create a new vector index definition.
Sourcepub fn to_definition(&self) -> JsonValue
pub fn to_definition(&self) -> JsonValue
Convert to index definition.
Trait Implementations§
Source§impl Clone for VectorIndex
impl Clone for VectorIndex
Source§fn clone(&self) -> VectorIndex
fn clone(&self) -> VectorIndex
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 VectorIndex
impl Debug for VectorIndex
Source§impl<'de> Deserialize<'de> for VectorIndex
impl<'de> Deserialize<'de> for VectorIndex
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 VectorIndex
impl PartialEq for VectorIndex
Source§impl Serialize for VectorIndex
impl Serialize for VectorIndex
impl StructuralPartialEq for VectorIndex
Auto Trait Implementations§
impl Freeze for VectorIndex
impl RefUnwindSafe for VectorIndex
impl Send for VectorIndex
impl Sync for VectorIndex
impl Unpin for VectorIndex
impl UnwindSafe for VectorIndex
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