Skip to main content

EncodedQuery

Trait EncodedQuery 

Source
pub trait EncodedQuery: Send + Sync {
    // Required method
    fn distance_to(&self, blob: &[u8]) -> f32;
}
Expand description

A prepared query bound to one codec + metric.

Required Methods§

Source

fn distance_to(&self, blob: &[u8]) -> f32

Distance from the query to an encoded vector. Conventions match the index plane: Euclidean root, 1 − cos (clamped ≥ 0), −dot (clamped ≥ 0), Manhattan sum.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§