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 &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn payload(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
Payload of the custom section.
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 more
sourceimpl 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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &CustomSection) -> bool
fn ne(&self, other: &CustomSection) -> bool
This method tests for !=
.
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more