pub struct WasmLoader { /* private fields */ }Expand description
Loader for .wasm component libs, backed by a host wasm runtime.
A wasm site export is registered as an opaque value under its placement
symbol. Calling that value invokes the guest’s <placement>/realize
operation through the bounded wasm host call path; agent libraries adapt the
value into an EvalSite.
Implementations§
Source§impl WasmLoader
impl WasmLoader
Sourcepub fn new(runtime: Arc<dyn WasmRuntime>) -> WasmLoader
pub fn new(runtime: Arc<dyn WasmRuntime>) -> WasmLoader
Creates a wasm loader that instantiates components on runtime.
Trait Implementations§
Source§impl LibLoader for WasmLoader
impl LibLoader for WasmLoader
Source§fn can_load(&self, source: &LibSource) -> bool
fn can_load(&self, source: &LibSource) -> bool
Reports whether this loader accepts the given source.
Source§fn load(&self, cx: &mut Cx, source: LibSource) -> Result<Box<dyn Lib>, Error>
fn load(&self, cx: &mut Cx, source: LibSource) -> Result<Box<dyn Lib>, Error>
Loads the source into a library object.
Source§fn inspect_manifest(
&self,
_cx: &mut Cx,
_source: &LibSource,
) -> Result<Option<LibManifest>, Error>
fn inspect_manifest( &self, _cx: &mut Cx, _source: &LibSource, ) -> Result<Option<LibManifest>, Error>
Inspects a source’s manifest without fully loading it; the default
returns
None (not supported).Auto Trait Implementations§
impl !RefUnwindSafe for WasmLoader
impl !UnwindSafe for WasmLoader
impl Freeze for WasmLoader
impl Send for WasmLoader
impl Sync for WasmLoader
impl Unpin for WasmLoader
impl UnsafeUnpin for WasmLoader
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