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 moreSource§impl Debug for ElementSegment
impl Debug for ElementSegment
Source§impl Deserialize for ElementSegment
impl Deserialize for ElementSegment
Source§impl PartialEq for ElementSegment
impl PartialEq for ElementSegment
Source§impl Serialize for ElementSegment
impl Serialize for ElementSegment
impl StructuralPartialEq for ElementSegment
Auto Trait Implementations§
impl Freeze for ElementSegment
impl RefUnwindSafe for ElementSegment
impl Send for ElementSegment
impl Sync for ElementSegment
impl Unpin for ElementSegment
impl UnwindSafe for ElementSegment
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more