pub struct VectorRecord {
pub id: String,
pub vector: Vec<f32>,
pub score: Option<f32>,
pub metadata: Option<HashMap<String, Value>>,
}Fields§
§id: String§vector: Vec<f32>§score: Option<f32>§metadata: Option<HashMap<String, Value>>Implementations§
Source§impl VectorRecord
impl VectorRecord
pub fn new(id: impl Into<String>, vector: Vec<f32>) -> Self
pub fn with_score(self, score: f32) -> Self
pub fn with_metadata(self, metadata: HashMap<String, Value>) -> Self
pub fn from_embedding(record: &EmbeddingRecord) -> Self
Trait Implementations§
Source§impl Clone for VectorRecord
impl Clone for VectorRecord
Source§fn clone(&self) -> VectorRecord
fn clone(&self) -> VectorRecord
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 moreAuto Trait Implementations§
impl Freeze for VectorRecord
impl RefUnwindSafe for VectorRecord
impl Send for VectorRecord
impl Sync for VectorRecord
impl Unpin for VectorRecord
impl UnsafeUnpin for VectorRecord
impl UnwindSafe for VectorRecord
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