pub enum Section {
Standard(StandardSection),
Custom(CustomSection),
}Expand description
A WebAssembly module section.
It is recommended to import the SectionLike trait for additional functions.
Variants§
Implementations§
Source§impl Section
impl Section
Sourcepub fn new(id: SectionId, payload: Vec<u8>) -> Result<Self, WSError>
pub fn new(id: SectionId, payload: Vec<u8>) -> Result<Self, WSError>
Create a new section with the given identifier and payload.
Sourcepub fn deserialize(reader: &mut impl Read) -> Result<Option<Self>, WSError>
pub fn deserialize(reader: &mut impl Read) -> Result<Option<Self>, WSError>
Create a section from its standard serialized representation.
Sourcepub fn is_signature_header(&self) -> bool
pub fn is_signature_header(&self) -> bool
Return true if the section contains the module’s signatures.
Sourcepub fn is_signature_delimiter(&self) -> bool
pub fn is_signature_delimiter(&self) -> bool
Return true if the section is a signature delimiter.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Section
impl RefUnwindSafe for Section
impl Send for Section
impl Sync for Section
impl Unpin for Section
impl UnwindSafe for Section
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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