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
Domain type that can be stored in an EmbeddingRegistry.
Implement this trait for any struct that should be embedded and persisted in Qdrant.
The registry uses key and content_hash to
detect which items need to be re-embedded on each EmbeddingRegistry::sync call.
Required Methods§
Sourcefn content_hash(&self) -> String
fn content_hash(&self) -> String
BLAKE3 hex hash of all semantically relevant fields.
When this hash changes between syncs the item’s embedding is recomputed.
Sourcefn embed_text(&self) -> &str
fn embed_text(&self) -> &str
Text that will be passed to the embedding model.
Sourcefn to_payload(&self) -> Value
fn to_payload(&self) -> Value
Full JSON payload to store in Qdrant alongside the vector.
Must include a "key" field equal to Self::key() so
EmbeddingRegistry can recover items on scroll.