pub struct WasmModule {
pub binary: Vec<u8>,
pub metadata: PipelineMetadata,
pub exports: Vec<String>,
pub imports: Vec<String>,
}Expand description
WebAssembly module representation
Fields§
§binary: Vec<u8>§metadata: PipelineMetadata§exports: Vec<String>§imports: Vec<String>Implementations§
Source§impl WasmModule
impl WasmModule
Sourcepub fn from_binary(binary: &[u8]) -> SklResult<Self>
pub fn from_binary(binary: &[u8]) -> SklResult<Self>
Load from WebAssembly binary
Sourcepub fn extract_metadata(&self) -> SklResult<PipelineMetadata>
pub fn extract_metadata(&self) -> SklResult<PipelineMetadata>
Extract metadata from WASM custom sections
Sourcepub fn extract_steps(&self) -> SklResult<Vec<WasmStep>>
pub fn extract_steps(&self) -> SklResult<Vec<WasmStep>>
Extract pipeline steps from WASM
Auto Trait Implementations§
impl Freeze for WasmModule
impl RefUnwindSafe for WasmModule
impl Send for WasmModule
impl Sync for WasmModule
impl Unpin for WasmModule
impl UnwindSafe for WasmModule
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more