Struct VectorRecord
pub struct VectorRecord { /* private fields */ }Expand description
A vector store record.
Implementations§
§impl VectorRecord
impl VectorRecord
pub fn new(id: VectorId, embedding: Embedding) -> VectorRecord
pub fn new(id: VectorId, embedding: Embedding) -> VectorRecord
Creates a vector record.
pub fn with_dimension(
self,
dimension: VectorDimension,
) -> Result<VectorRecord, InvalidDimensionError>
pub fn with_dimension( self, dimension: VectorDimension, ) -> Result<VectorRecord, InvalidDimensionError>
Sets and validates the expected dimension.
pub const fn with_similarity_metric(
self,
similarity_metric: SimilarityMetric,
) -> VectorRecord
pub const fn with_similarity_metric( self, similarity_metric: SimilarityMetric, ) -> VectorRecord
Sets the similarity metric.
pub fn with_metadata(self, metadata: VectorMetadata) -> VectorRecord
pub fn with_metadata(self, metadata: VectorMetadata) -> VectorRecord
Sets vector metadata.
pub const fn dimension(&self) -> Option<VectorDimension>
pub const fn dimension(&self) -> Option<VectorDimension>
Returns the validated dimension, if present.
pub const fn similarity_metric(&self) -> Option<SimilarityMetric>
pub const fn similarity_metric(&self) -> Option<SimilarityMetric>
Returns the similarity metric, if present.
pub const fn metadata(&self) -> &VectorMetadata
pub const fn metadata(&self) -> &VectorMetadata
Returns vector metadata.
Trait Implementations§
§impl Clone for VectorRecord
impl Clone for VectorRecord
§fn clone(&self) -> VectorRecord
fn clone(&self) -> VectorRecord
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 more§impl Debug for VectorRecord
impl Debug for VectorRecord
§impl PartialEq for VectorRecord
impl PartialEq for VectorRecord
impl StructuralPartialEq for VectorRecord
Auto Trait Implementations§
impl Freeze for VectorRecord
impl RefUnwindSafe for VectorRecord
impl Send for VectorRecord
impl Sync for VectorRecord
impl Unpin for VectorRecord
impl UnsafeUnpin for VectorRecord
impl UnwindSafe for VectorRecord
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