Skip to main content

Embeddable

Trait Embeddable 

Source
pub trait Embeddable: Send + Sync {
    // Required methods
    fn key(&self) -> &str;
    fn content_hash(&self) -> String;
    fn embed_text(&self) -> &str;
    fn to_payload(&self) -> Value;
}
Expand description

Trait implemented by domain types that can be stored in an EmbeddingRegistry.

Required Methods§

Source

fn key(&self) -> &str

Unique string key used for point-ID generation and delta tracking.

Source

fn content_hash(&self) -> String

blake3 hex hash of all semantically relevant fields.

Source

fn embed_text(&self) -> &str

Text that will be embedded (e.g. description).

Source

fn to_payload(&self) -> Value

Full JSON payload to store in Qdrant. Must include a "key" field equal to Self::key() so EmbeddingRegistry can recover it on scroll.

Implementors§