Skip to main content

ImageEmbedder

Trait ImageEmbedder 

Source
pub trait ImageEmbedder: Send + Sync {
    // Required method
    fn embed_images(&self, images: &[Vec<u8>]) -> Result<Vec<Vec<f32>>>;

    // Provided method
    fn model_id(&self) -> Option<&str> { ... }
}
Expand description

Minimal image embedder interface (bytes -> vectors).

images are opaque bytes (e.g. JPEG/PNG). Format detection/decoding is backend-specific.

Required Methods§

Source

fn embed_images(&self, images: &[Vec<u8>]) -> Result<Vec<Vec<f32>>>

Provided Methods§

Source

fn model_id(&self) -> Option<&str>

Implementors§