Struct parity_wasm::elements::DataSegment [−][src]
pub struct DataSegment { /* fields omitted */ }Data segment definition.
Implementations
impl DataSegment[src]
impl DataSegment[src]pub fn new(index: u32, offset: Option<InitExpr>, value: Vec<u8>) -> Self[src]
New data segments.
pub fn index(&self) -> u32[src]
Linear memory index (currently the only valid value is 0).
pub fn offset(&self) -> &Option<InitExpr>[src]
An i32 initializer expression that computes the offset at which to place the data.
Note that this return None if the segment is passive.
pub fn offset_mut(&mut self) -> &mut Option<InitExpr>[src]
An i32 initializer expression that computes the offset at which to place the data (mutable)
Note that this return None if the segment is passive.
pub fn value(&self) -> &[u8][src]
Initial value of the data segment.
pub fn value_mut(&mut self) -> &mut Vec<u8>[src]
Initial value of the data segment (mutable).
Trait Implementations
impl Clone for DataSegment[src]
impl Clone for DataSegment[src]fn clone(&self) -> DataSegment[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Deserialize for DataSegment[src]
impl Deserialize for DataSegment[src]impl PartialEq<DataSegment> for DataSegment[src]
impl PartialEq<DataSegment> for DataSegment[src]fn eq(&self, other: &DataSegment) -> bool[src]
fn ne(&self, other: &DataSegment) -> bool[src]
impl Serialize for DataSegment[src]
impl Serialize for DataSegment[src]