pub struct Data {
pub kind: DataKind,
pub value: Vec<u8>,
pub name: Option<String>,
/* private fields */
}
Expand description
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.
name: Option<String>
The name of this data, used for debugging purposes in the name
custom section.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Data
impl Send for Data
impl Sync for Data
impl Unpin for Data
impl UnwindSafe for Data
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