pub enum VectorMetric {
Cosine,
Euclidean,
Dot,
}Expand description
A vector distance metric (pgvector).
PHP: Utopia\Query\Builder\VectorMetric.
Variants§
Implementations§
Source§impl VectorMetric
impl VectorMetric
Sourcepub const CASES: &'static [VectorMetric]
pub const CASES: &'static [VectorMetric]
Every case, in declaration order.
PHP: cases().
Sourcepub const PHP_CLASS: &'static str = "Utopia\\Query\\Builder\\VectorMetric"
pub const PHP_CLASS: &'static str = "Utopia\\Query\\Builder\\VectorMetric"
The PHP class of this enumeration.
Sourcepub fn try_from_value(value: &str) -> Option<Self>
pub fn try_from_value(value: &str) -> Option<Self>
The case with backing value value, if any.
PHP: tryFrom().
Sourcepub fn from_value(value: &str) -> Result<Self, Error>
pub fn from_value(value: &str) -> Result<Self, Error>
The case with backing value value.
PHP: from(), which throws ValueError (Error::InvalidValue) with the same message.
Source§impl VectorMetric
impl VectorMetric
Sourcepub fn to_operator(self) -> &'static str
pub fn to_operator(self) -> &'static str
The pgvector operator: <=>, <-> or <#>.
PHP: toOperator().
Trait Implementations§
Source§impl Clone for VectorMetric
impl Clone for VectorMetric
impl Copy for VectorMetric
Source§impl Debug for VectorMetric
impl Debug for VectorMetric
Source§impl Display for VectorMetric
impl Display for VectorMetric
impl Eq for VectorMetric
Source§impl Hash for VectorMetric
impl Hash for VectorMetric
Source§impl PartialEq for VectorMetric
impl PartialEq for VectorMetric
impl StructuralPartialEq for VectorMetric
Auto Trait Implementations§
impl Forget for VectorMetric
impl Freeze for VectorMetric
impl Move 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§
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.