Struct wasmtime_wasi_nn::InMemoryRegistry
source · pub struct InMemoryRegistry(/* private fields */);
Implementations§
source§impl InMemoryRegistry
impl InMemoryRegistry
pub fn new() -> Self
sourcepub fn load(
&mut self,
backend: &mut dyn BackendFromDir,
path: &Path
) -> Result<()>
pub fn load( &mut self, backend: &mut dyn BackendFromDir, path: &Path ) -> Result<()>
Load a graph from the files contained in the path
directory.
This expects the backend to know how to load graphs (i.e., ML model)
from a directory. The name used in the registry is the directory’s last
suffix: if the backend can find the files it expects in /my/model/foo
,
the registry will contain a new graph named foo
.
Trait Implementations§
source§impl GraphRegistry for InMemoryRegistry
impl GraphRegistry for InMemoryRegistry
Auto Trait Implementations§
impl Freeze for InMemoryRegistry
impl !RefUnwindSafe for InMemoryRegistry
impl Send for InMemoryRegistry
impl Sync for InMemoryRegistry
impl Unpin for InMemoryRegistry
impl !UnwindSafe for InMemoryRegistry
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