pub trait Embedding:
'static
+ Clone
+ Hash
+ PartialEq
+ Eq
+ Debug
+ Display
+ EmbeddingProtoConvert {
type Scalar: 'static + Copy + Clone + Send + Sync;
// Required methods
fn length() -> usize;
fn as_slice(&self) -> &[Self::Scalar];
fn from_slice(data: &[Self::Scalar]) -> Self;
fn zeros() -> Self;
}Expand description
A fixed-dimensionality embedding vector.
Required Associated Types§
Required Methods§
fn length() -> usize
fn as_slice(&self) -> &[Self::Scalar]
fn from_slice(data: &[Self::Scalar]) -> Self
fn zeros() -> Self
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.