#[non_exhaustive]pub struct SparseEmbedding {
pub values: Vec<f32>,
pub dimensions: Vec<i64>,
/* private fields */
}Available on crate features
index-service or match-service only.Expand description
Feature embedding vector for sparse index. An array of numbers whose values are located in the specified dimensions.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.values: Vec<f32>Required. The list of embedding values of the sparse vector.
dimensions: Vec<i64>Required. The list of indexes for the embedding values of the sparse vector.
Implementations§
Source§impl SparseEmbedding
impl SparseEmbedding
pub fn new() -> Self
Sourcepub fn set_values<T, V>(self, v: T) -> Self
pub fn set_values<T, V>(self, v: T) -> Self
Sourcepub fn set_dimensions<T, V>(self, v: T) -> Self
pub fn set_dimensions<T, V>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for SparseEmbedding
impl Clone for SparseEmbedding
Source§fn clone(&self) -> SparseEmbedding
fn clone(&self) -> SparseEmbedding
Returns a duplicate of the value. Read more
1.0.0 · 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 SparseEmbedding
impl Debug for SparseEmbedding
Source§impl Default for SparseEmbedding
impl Default for SparseEmbedding
Source§fn default() -> SparseEmbedding
fn default() -> SparseEmbedding
Returns the “default value” for a type. Read more
Source§impl Message for SparseEmbedding
impl Message for SparseEmbedding
Source§impl PartialEq for SparseEmbedding
impl PartialEq for SparseEmbedding
impl StructuralPartialEq for SparseEmbedding
Auto Trait Implementations§
impl Freeze for SparseEmbedding
impl RefUnwindSafe for SparseEmbedding
impl Send for SparseEmbedding
impl Sync for SparseEmbedding
impl Unpin for SparseEmbedding
impl UnwindSafe for SparseEmbedding
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