pub struct EmbeddingSpace {
pub vector: Vec<f32>,
pub dimensions: u32,
pub model: String,
pub generated_at: u64,
}Expand description
An embedding vector in a named semantic space.
Knowledge Objects can carry embeddings in multiple spaces simultaneously:
"semantic"— general-purpose sentence embedding (e.g., text-embedding-3-small)"code"— code-specific embedding (e.g., CodeBERT)"temporal"— time-series embedding for temporal similarity"visual"— image/diagram embedding (e.g., CLIP)
Each space can have a different dimensionality and distance metric.
Fields§
§vector: Vec<f32>The embedding vector (f32 components).
dimensions: u32Dimensionality of this embedding.
model: StringThe model that generated this embedding. Enables re-embedding when models are upgraded.
generated_at: u64When this embedding was generated (HLC-encoded microseconds). Enables staleness detection and re-embedding triggers.
Implementations§
Trait Implementations§
Source§impl Clone for EmbeddingSpace
impl Clone for EmbeddingSpace
Source§fn clone(&self) -> EmbeddingSpace
fn clone(&self) -> EmbeddingSpace
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 EmbeddingSpace
impl Debug for EmbeddingSpace
Source§impl<'de> Deserialize<'de> for EmbeddingSpace
impl<'de> Deserialize<'de> for EmbeddingSpace
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EmbeddingSpace
impl RefUnwindSafe for EmbeddingSpace
impl Send for EmbeddingSpace
impl Sync for EmbeddingSpace
impl Unpin for EmbeddingSpace
impl UnsafeUnpin for EmbeddingSpace
impl UnwindSafe for EmbeddingSpace
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