Struct parity_wasm::elements::ElementSegment
source · pub struct ElementSegment { /* private fields */ }Expand description
Entry in the element section.
Implementations§
source§impl 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§
source§impl Clone for ElementSegment
impl Clone for ElementSegment
source§fn clone(&self) -> ElementSegment
fn clone(&self) -> ElementSegment
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more