pub struct WasmOps;Expand description
WasmOps Runtime API for accessing embedded WASM modules.
Implementations§
Source§impl WasmOps
impl WasmOps
Sourcepub fn get(role: &CanisterRole) -> Option<WasmModule>
pub fn get(role: &CanisterRole) -> Option<WasmModule>
Fetch a WASM module for the given canister role, if registered.
Sourcepub fn try_get(role: &CanisterRole) -> Result<WasmModule, Error>
pub fn try_get(role: &CanisterRole) -> Result<WasmModule, Error>
Fetch a WASM module or return an error if missing.
Sourcepub fn import_static(wasms: &'static [(CanisterRole, &[u8])])
pub fn import_static(wasms: &'static [(CanisterRole, &[u8])])
Import a static slice of (role, wasm bytes) at startup.
Intended to be called during canister initialization.
Sourcepub fn import_static_quiet(wasms: &'static [(CanisterRole, &[u8])])
pub fn import_static_quiet(wasms: &'static [(CanisterRole, &[u8])])
Import a static slice of (role, wasm bytes) without logging.
Auto Trait Implementations§
impl Freeze for WasmOps
impl RefUnwindSafe for WasmOps
impl Send for WasmOps
impl Sync for WasmOps
impl Unpin for WasmOps
impl UnwindSafe for WasmOps
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