Skip to main content

Embed

Trait Embed 

Source
pub trait Embed {
    // Required method
    fn embed(&self, embedder: &mut TextEmbedder) -> Result<(), EmbedError>;
}
Expand description

Implemented by types that can be converted to text for embedding.

Use the derive macro or implement manually.

Required Methods§

Source

fn embed(&self, embedder: &mut TextEmbedder) -> Result<(), EmbedError>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Embed for &str

Source§

impl Embed for String

Source§

impl Embed for Value

Source§

impl<T: Embed> Embed for &T

Source§

impl<T: Embed> Embed for Option<T>

Source§

impl<T: Embed> Embed for Vec<T>

Implementors§