pub struct MockGenerator { /* private fields */ }Implementations§
Source§impl MockGenerator
impl MockGenerator
pub fn new(model_type: EmbeddingModelType, num_embeddings: usize) -> Self
Trait Implementations§
Source§impl Clone for MockGenerator
impl Clone for MockGenerator
Source§fn clone(&self) -> MockGenerator
fn clone(&self) -> MockGenerator
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl EmbeddingGenerator for MockGenerator
impl EmbeddingGenerator for MockGenerator
fn model_type(&self) -> EmbeddingModelType
fn set_model_type(&mut self, model_type: EmbeddingModelType)
fn box_clone(&self) -> Box<dyn EmbeddingGenerator>
Source§fn generate_embedding_blocking(
&self,
_input_string: &str,
) -> Result<Vec<f32>, ZooEmbeddingError>
fn generate_embedding_blocking( &self, _input_string: &str, ) -> Result<Vec<f32>, ZooEmbeddingError>
Generates an embedding from the given input string, and assigns the
provided id.
Source§fn generate_embeddings_blocking(
&self,
input_strings: &Vec<String>,
) -> Result<Vec<Vec<f32>>, ZooEmbeddingError>
fn generate_embeddings_blocking( &self, input_strings: &Vec<String>, ) -> Result<Vec<Vec<f32>>, ZooEmbeddingError>
Generates embeddings from the given list of input strings and ids.
Source§fn generate_embedding<'life0, 'life1, 'async_trait>(
&'life0 self,
_input_string: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<f32>, ZooEmbeddingError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn generate_embedding<'life0, 'life1, 'async_trait>(
&'life0 self,
_input_string: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<f32>, ZooEmbeddingError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Generates an embedding from the given input string, and assigns the
provided id.
Source§fn generate_embeddings<'life0, 'life1, 'async_trait>(
&'life0 self,
input_strings: &'life1 Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f32>>, ZooEmbeddingError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn generate_embeddings<'life0, 'life1, 'async_trait>(
&'life0 self,
input_strings: &'life1 Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f32>>, ZooEmbeddingError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Generates embeddings from the given list of input strings and ids.
Source§fn generate_embedding_default_blocking(
&self,
input_string: &str,
) -> Result<Vec<f32>, ZooEmbeddingError>
fn generate_embedding_default_blocking( &self, input_string: &str, ) -> Result<Vec<f32>, ZooEmbeddingError>
Generate an Embedding for an input string, sets id to a default value
of empty string.
Source§fn generate_embeddings_blocking_default(
&self,
input_strings: &Vec<String>,
) -> Result<Vec<Vec<f32>>, ZooEmbeddingError>
fn generate_embeddings_blocking_default( &self, input_strings: &Vec<String>, ) -> Result<Vec<Vec<f32>>, ZooEmbeddingError>
Generate Embeddings for a list of input strings, sets ids to default.
Source§fn generate_embedding_default<'life0, 'life1, 'async_trait>(
&'life0 self,
input_string: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<f32>, ZooEmbeddingError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn generate_embedding_default<'life0, 'life1, 'async_trait>(
&'life0 self,
input_string: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<f32>, ZooEmbeddingError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Generate an Embedding for an input string, sets id to a default value
of empty string.
Source§fn generate_embeddings_default<'life0, 'life1, 'async_trait>(
&'life0 self,
input_strings: &'life1 Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f32>>, ZooEmbeddingError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn generate_embeddings_default<'life0, 'life1, 'async_trait>(
&'life0 self,
input_strings: &'life1 Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f32>>, ZooEmbeddingError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Generate Embeddings for a list of input strings, sets ids to default
Auto Trait Implementations§
impl Freeze for MockGenerator
impl RefUnwindSafe for MockGenerator
impl Send for MockGenerator
impl Sync for MockGenerator
impl Unpin for MockGenerator
impl UnsafeUnpin for MockGenerator
impl UnwindSafe for MockGenerator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more