pub enum Payload {
Component {
metadata: Metadata,
children: Vec<Payload>,
},
Module(Metadata),
}
Expand description
Data representing either a Wasm Component or module
Each payload has additional Metadata
associated with it,
but if it’s a Component it may have also additional Payloads
associated
with it.
Variants§
Component
A representation of a Wasm Component
Fields
Module(Metadata)
A representation of a Wasm Module
Implementations§
Source§impl Payload
impl Payload
Sourcepub fn from_binary(input: &[u8]) -> Result<Self>
pub fn from_binary(input: &[u8]) -> Result<Self>
Parse metadata from a WebAssembly binary. Supports both core WebAssembly modules, and WebAssembly components.
Sourcepub fn metadata_mut(&mut self) -> &mut Metadata
pub fn metadata_mut(&mut self) -> &mut Metadata
Get a mutable reference te the metadata
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Payload
impl RefUnwindSafe for Payload
impl Send for Payload
impl Sync for Payload
impl Unpin for Payload
impl UnwindSafe for Payload
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