pub struct ModelHandle { /* private fields */ }Implementations§
Source§impl ModelHandle
impl ModelHandle
pub fn new( model_id: impl Into<String>, backend: impl Into<String>, format: ModelFormat, inner: Arc<dyn Any + Send + Sync>, ) -> Self
pub fn id(&self) -> &str
pub fn backend(&self) -> &str
pub fn format(&self) -> &ModelFormat
pub fn state<T: Any + Send + Sync>(&self) -> Option<&T>
Trait Implementations§
Source§impl Clone for ModelHandle
impl Clone for ModelHandle
Auto Trait Implementations§
impl !RefUnwindSafe for ModelHandle
impl !UnwindSafe for ModelHandle
impl Freeze for ModelHandle
impl Send for ModelHandle
impl Sync for ModelHandle
impl Unpin for ModelHandle
impl UnsafeUnpin for ModelHandle
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