Struct gear_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 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§fn 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 ==
.source§impl 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§
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