[][src]Struct walrus::Data

pub struct Data {
    pub kind: DataKind,
    pub value: Vec<u8>,
    // some fields omitted
}

A data segment.

Every data segment has an associated value. This value gets copied into a memory. It is either automatically copied into a specific memory at Wasm instantiation time (active data segments) or dynamically copied into a memory (or memories) via the memory.init instruction (passive data segments). See the kind member and DataKind type for more details on the active/passive distinction.

Fields

kind: DataKind

What kind of data segment is this? Passive or active?

value: Vec<u8>

The data payload of this data segment.

Methods

impl Data[src]

pub fn id(&self) -> DataId[src]

Returns the id of this passive data segment

pub fn is_passive(&self) -> bool[src]

Is this a passive data segment?

Trait Implementations

impl Debug for Data[src]

Auto Trait Implementations

impl Unpin for Data

impl Sync for Data

impl Send for Data

impl UnwindSafe for Data

impl RefUnwindSafe for Data

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]