pub struct DynEmbeddingModel(/* private fields */);Expand description
Type-erased embedding model handle. See DynLanguageModel for rationale.
Implementations§
Source§impl DynEmbeddingModel
impl DynEmbeddingModel
Sourcepub fn new<M: EmbeddingModel + 'static>(model: M) -> Self
pub fn new<M: EmbeddingModel + 'static>(model: M) -> Self
Wrap a concrete model implementation.
Sourcepub fn from_arc(model: Arc<dyn EmbeddingModel>) -> Self
pub fn from_arc(model: Arc<dyn EmbeddingModel>) -> Self
Wrap an already-shared Arc.
Sourcepub fn into_inner(self) -> Arc<dyn EmbeddingModel> ⓘ
pub fn into_inner(self) -> Arc<dyn EmbeddingModel> ⓘ
Consume the wrapper and return the underlying Arc.
Trait Implementations§
Source§impl Clone for DynEmbeddingModel
impl Clone for DynEmbeddingModel
Source§fn clone(&self) -> DynEmbeddingModel
fn clone(&self) -> DynEmbeddingModel
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 Debug for DynEmbeddingModel
impl Debug for DynEmbeddingModel
Auto Trait Implementations§
impl Freeze for DynEmbeddingModel
impl !RefUnwindSafe for DynEmbeddingModel
impl Send for DynEmbeddingModel
impl Sync for DynEmbeddingModel
impl Unpin for DynEmbeddingModel
impl UnsafeUnpin for DynEmbeddingModel
impl !UnwindSafe for DynEmbeddingModel
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