Struct parity_wasm::elements::ElementSegment
source · [−]pub struct ElementSegment { /* private fields */ }
Expand description
Entry in the element section.
Implementations
sourceimpl ElementSegment
impl ElementSegment
sourcepub fn new(index: u32, offset: Option<InitExpr>, members: Vec<u32>) -> Self
pub fn new(index: u32, offset: Option<InitExpr>, members: Vec<u32>) -> Self
New element segment.
sourcepub fn members_mut(&mut self) -> &mut Vec<u32>
pub fn members_mut(&mut self) -> &mut Vec<u32>
Sequence of function indices (mutable)
sourcepub fn offset(&self) -> &Option<InitExpr>
pub fn offset(&self) -> &Option<InitExpr>
An i32 initializer expression that computes the offset at which to place the elements.
Note that this return None
if the segment is passive
.
sourcepub fn offset_mut(&mut self) -> &mut Option<InitExpr>
pub fn offset_mut(&mut self) -> &mut Option<InitExpr>
An i32 initializer expression that computes the offset at which to place the elements (mutable)
Note that this return None
if the segment is passive
.
Trait Implementations
sourceimpl Clone for ElementSegment
impl Clone for ElementSegment
sourcefn clone(&self) -> ElementSegment
fn clone(&self) -> ElementSegment
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 ElementSegment
impl Debug for ElementSegment
sourceimpl Deserialize for ElementSegment
impl Deserialize for ElementSegment
sourceimpl PartialEq<ElementSegment> for ElementSegment
impl PartialEq<ElementSegment> for ElementSegment
sourcefn eq(&self, other: &ElementSegment) -> bool
fn eq(&self, other: &ElementSegment) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ElementSegment) -> bool
fn ne(&self, other: &ElementSegment) -> bool
This method tests for !=
.
sourceimpl Serialize for ElementSegment
impl Serialize for ElementSegment
impl StructuralPartialEq for ElementSegment
Auto Trait Implementations
impl RefUnwindSafe for ElementSegment
impl Send for ElementSegment
impl Sync for ElementSegment
impl Unpin for ElementSegment
impl UnwindSafe for ElementSegment
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)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more