pub struct VectorNearest {
pub field: String,
pub query: Vec<f32>,
pub metric: VectorMetric,
}Expand description
Nearest-neighbor search specification for a pgvector field.
Fields§
§field: StringLogical field name of the vector column to search against.
query: Vec<f32>Query embedding to compare against the stored vectors.
metric: VectorMetricDistance metric to use for ordering.
Trait Implementations§
Source§impl Clone for VectorNearest
impl Clone for VectorNearest
Source§fn clone(&self) -> VectorNearest
fn clone(&self) -> VectorNearest
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 moreSource§impl Debug for VectorNearest
impl Debug for VectorNearest
Source§impl PartialEq for VectorNearest
impl PartialEq for VectorNearest
Source§fn eq(&self, other: &VectorNearest) -> bool
fn eq(&self, other: &VectorNearest) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for VectorNearest
Auto Trait Implementations§
impl Freeze for VectorNearest
impl RefUnwindSafe for VectorNearest
impl Send for VectorNearest
impl Sync for VectorNearest
impl Unpin for VectorNearest
impl UnsafeUnpin for VectorNearest
impl UnwindSafe for VectorNearest
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