Struct parity_wasm::elements::CustomSection
source · pub struct CustomSection { /* private fields */ }
Expand description
Custom section.
Implementations
sourceimpl CustomSection
impl CustomSection
sourcepub fn new(name: String, payload: Vec<u8>) -> CustomSection
pub fn new(name: String, payload: Vec<u8>) -> CustomSection
Creates a new custom section with the given name and payload.
sourcepub fn payload(&self) -> &[u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
pub fn payload(&self) -> &[u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
Payload of the custom secion.
sourcepub fn payload_mut(&mut self) -> &mut Vec<u8>
pub fn payload_mut(&mut self) -> &mut Vec<u8>
Payload of the custom section (mutable).
Trait Implementations
sourceimpl Clone for CustomSection
impl Clone for CustomSection
sourcefn clone(&self) -> CustomSection
fn clone(&self) -> CustomSection
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for CustomSection
impl Debug for CustomSection
sourceimpl Default for CustomSection
impl Default for CustomSection
sourcefn default() -> CustomSection
fn default() -> CustomSection
Returns the “default value” for a type. Read more
sourceimpl Deserialize for CustomSection
impl Deserialize for CustomSection
sourceimpl PartialEq<CustomSection> for CustomSection
impl PartialEq<CustomSection> for CustomSection
sourcefn eq(&self, other: &CustomSection) -> bool
fn eq(&self, other: &CustomSection) -> bool
sourceimpl Serialize for CustomSection
impl Serialize for CustomSection
impl StructuralPartialEq for CustomSection
Auto Trait Implementations
impl RefUnwindSafe for CustomSection
impl Send for CustomSection
impl Sync for CustomSection
impl Unpin for CustomSection
impl UnwindSafe for CustomSection
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more