pub enum VectorMetric {
Cosine,
L2,
Dot,
}Expand description
Distance metric for the HNSW index.
Variants§
Trait Implementations§
Source§impl Clone for VectorMetric
impl Clone for VectorMetric
Source§fn clone(&self) -> VectorMetric
fn clone(&self) -> VectorMetric
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for VectorMetric
Source§impl Debug for VectorMetric
impl Debug for VectorMetric
Source§impl Default for VectorMetric
impl Default for VectorMetric
Source§fn default() -> VectorMetric
fn default() -> VectorMetric
Returns the “default value” for a type. Read more
impl Eq for VectorMetric
Source§impl FromStr for VectorMetric
impl FromStr for VectorMetric
Source§fn from_str(s: &str) -> Result<VectorMetric, <VectorMetric as FromStr>::Err>
fn from_str(s: &str) -> Result<VectorMetric, <VectorMetric as FromStr>::Err>
Parse a metric name. Case-insensitive. Accepts cosine, l2, and dot
(with the alias ip for inner product). This is the one canonical
mapping every binding (CLI, REST, MCP, and Python) parses through.
Source§type Err = VectorError
type Err = VectorError
The associated error which can be returned from parsing.
Source§impl PartialEq for VectorMetric
impl PartialEq for VectorMetric
Source§fn eq(&self, other: &VectorMetric) -> bool
fn eq(&self, other: &VectorMetric) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for VectorMetric
Auto Trait Implementations§
impl Freeze for VectorMetric
impl RefUnwindSafe for VectorMetric
impl Send for VectorMetric
impl Sync for VectorMetric
impl Unpin for VectorMetric
impl UnsafeUnpin for VectorMetric
impl UnwindSafe for VectorMetric
Blanket Implementations§
impl<T> Allocation for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> OrderedSeq<'_, T> for Twhere
T: Clone,
Source§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
Source§impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
Source§fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
Invokes
WrappingSpan::make_wrapped to wrap an AST node in a span.