Struct golem_wasm_ast::core::Global
source · pub struct Global {
pub global_type: GlobalType,
pub init: Expr,
}
Expand description
The globals component of a module defines a vector of global variables (or globals for short):
Each global stores a single value of the given global type. Its type also specifies whether a global is immutable or mutable. Moreover, each global is initialized with an value given by a constant initializer expression.
Globals are referenced through global indices, starting with the smallest index not referencing a global import.
Fields§
§global_type: GlobalType
§init: Expr
Trait Implementations§
source§impl PartialEq for Global
impl PartialEq for Global
source§impl Section<CoreIndexSpace, CoreSectionType> for Global
impl Section<CoreIndexSpace, CoreSectionType> for Global
fn index_space(&self) -> CoreIndexSpace
fn section_type(&self) -> CoreSectionType
source§impl TryFrom<&Global> for GlobalSection
impl TryFrom<&Global> for GlobalSection
impl StructuralPartialEq for Global
Auto Trait Implementations§
impl Freeze for Global
impl RefUnwindSafe for Global
impl Send for Global
impl Sync for Global
impl Unpin for Global
impl UnwindSafe for Global
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
)