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