Trait SparseEmbeddingModel

Source
pub trait SparseEmbeddingModel:
    Send
    + Sync
    + Debug
    + DynClone {
    // Required method
    fn sparse_embed<'life0, 'async_trait>(
        &'life0 self,
        input: Vec<String>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<SparseEmbedding>, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;

    // Provided method
    fn name(&self) -> &'static str { ... }
}
Expand description

Embeds a list of strings and returns its embeddings. Assumes the strings will be moved.

Required Methods§

Source

fn sparse_embed<'life0, 'async_trait>( &'life0 self, input: Vec<String>, ) -> Pin<Box<dyn Future<Output = Result<Vec<SparseEmbedding>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Provided Methods§

Source

fn name(&self) -> &'static str

Trait Implementations§

Source§

impl<'clone> Clone for Box<dyn SparseEmbeddingModel + 'clone>

Source§

fn clone(&self) -> Box<dyn SparseEmbeddingModel + 'clone>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'clone> Clone for Box<dyn SparseEmbeddingModel + Send + 'clone>

Source§

fn clone(&self) -> Box<dyn SparseEmbeddingModel + Send + 'clone>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'clone> Clone for Box<dyn SparseEmbeddingModel + Send + Sync + 'clone>

Source§

fn clone(&self) -> Box<dyn SparseEmbeddingModel + Send + Sync + 'clone>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'clone> Clone for Box<dyn SparseEmbeddingModel + Sync + 'clone>

Source§

fn clone(&self) -> Box<dyn SparseEmbeddingModel + Sync + 'clone>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl SparseEmbeddingModel for &dyn SparseEmbeddingModel

Source§

fn sparse_embed<'life0, 'async_trait>( &'life0 self, input: Vec<String>, ) -> Pin<Box<dyn Future<Output = Result<Vec<SparseEmbedding>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, &dyn SparseEmbeddingModel: 'async_trait,

Source§

fn name(&self) -> &'static str

Source§

impl SparseEmbeddingModel for Box<dyn SparseEmbeddingModel>

Source§

fn sparse_embed<'life0, 'async_trait>( &'life0 self, input: Vec<String>, ) -> Pin<Box<dyn Future<Output = Result<Vec<SparseEmbedding>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Box<dyn SparseEmbeddingModel>: 'async_trait,

Source§

fn name(&self) -> &'static str

Implementations on Foreign Types§

Source§

impl SparseEmbeddingModel for Box<dyn SparseEmbeddingModel>

Source§

fn sparse_embed<'life0, 'async_trait>( &'life0 self, input: Vec<String>, ) -> Pin<Box<dyn Future<Output = Result<Vec<SparseEmbedding>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Box<dyn SparseEmbeddingModel>: 'async_trait,

Source§

fn name(&self) -> &'static str

Source§

impl SparseEmbeddingModel for Arc<dyn SparseEmbeddingModel>

Source§

fn sparse_embed<'life0, 'async_trait>( &'life0 self, input: Vec<String>, ) -> Pin<Box<dyn Future<Output = Result<Vec<SparseEmbedding>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Arc<dyn SparseEmbeddingModel>: 'async_trait,

Source§

fn name(&self) -> &'static str

Implementors§