pub struct SparseVector {
pub indices: Vec<u32>,
pub values: Vec<f32>,
}Expand description
Sparse embedding (indices + values). Transport-neutral — not a protobuf type.
Fields§
§indices: Vec<u32>Sorted token IDs (murmur3-32, wire-compatible with Qdrant qdrant/bm25).
values: Vec<f32>Per-token weights aligned with indices (unit for queries, tf for docs).
Trait Implementations§
Source§impl Clone for SparseVector
impl Clone for SparseVector
Source§fn clone(&self) -> SparseVector
fn clone(&self) -> SparseVector
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 SparseVector
impl Debug for SparseVector
Source§impl Default for SparseVector
impl Default for SparseVector
Source§fn default() -> SparseVector
fn default() -> SparseVector
Returns the “default value” for a type. Read more
Source§impl PartialEq for SparseVector
impl PartialEq for SparseVector
impl StructuralPartialEq for SparseVector
Auto Trait Implementations§
impl Freeze for SparseVector
impl RefUnwindSafe for SparseVector
impl Send for SparseVector
impl Sync for SparseVector
impl Unpin for SparseVector
impl UnsafeUnpin for SparseVector
impl UnwindSafe for SparseVector
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