Struct golem_wasm_ast::core::Data
source · pub struct Data<Expr: Clone> { /* private fields */ }
Expand description
The initial contents of a memory are zero bytes. Data segments can be used to initialize a range of memory from a static vector of bytes.
The datas component of a module defines a vector of data segments.
Like element segments, data segments have a mode that identifies them as either passive or active. A passive data segment’s contents can be copied into a memory using the memory.init instruction. An active data segment copies its contents into a memory during instantiation, as specified by a memory index and a constant expression defining an offset into that memory.
Data segments are referenced through data indices.
Trait Implementations§
source§impl From<Data<IgnoredExpr>> for IgnoredData
impl From<Data<IgnoredExpr>> for IgnoredData
source§fn from(_value: Data<IgnoredExpr>) -> Self
fn from(_value: Data<IgnoredExpr>) -> Self
Converts to this type from the input type.
source§impl<Expr: PartialEq + Clone> PartialEq for Data<Expr>
impl<Expr: PartialEq + Clone> PartialEq for Data<Expr>
source§impl<Expr: Debug + Clone + PartialEq> Section<CoreIndexSpace, CoreSectionType> for Data<Expr>
impl<Expr: Debug + Clone + PartialEq> Section<CoreIndexSpace, CoreSectionType> for Data<Expr>
fn index_space(&self) -> CoreIndexSpace
fn section_type(&self) -> CoreSectionType
source§impl<T: Clone + RetainsInstructions> TryFrom<&Data<T>> for DataSection
impl<T: Clone + RetainsInstructions> TryFrom<&Data<T>> for DataSection
impl<Expr: Clone> StructuralPartialEq for Data<Expr>
Auto Trait Implementations§
impl<Expr> Freeze for Data<Expr>where
Expr: Freeze,
impl<Expr> RefUnwindSafe for Data<Expr>where
Expr: RefUnwindSafe,
impl<Expr> Send for Data<Expr>where
Expr: Send,
impl<Expr> Sync for Data<Expr>where
Expr: Sync,
impl<Expr> Unpin for Data<Expr>where
Expr: Unpin,
impl<Expr> UnwindSafe for Data<Expr>where
Expr: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)