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>,
passive: bool
) -> Self
pub fn new(
index: u32,
offset: Option<InitExpr>,
members: Vec<u32>,
passive: bool
) -> 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
.
sourcepub fn passive_mut(&mut self) -> &mut bool
pub fn passive_mut(&mut self) -> &mut bool
Whether or not this table element 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 moresourceimpl 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
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 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