pub enum GlobalInit {
I32Const(i32),
I64Const(i64),
F32Const(u32),
F64Const(u64),
V128Const(V128Imm),
GetGlobal(GlobalIndex),
RefNullConst,
RefFunc(FuncIndex),
Import,
}Expand description
Globals are initialized via the const operators or by referring to another import.
Variants§
I32Const(i32)
An i32.const.
I64Const(i64)
An i64.const.
F32Const(u32)
An f32.const.
F64Const(u64)
An f64.const.
V128Const(V128Imm)
A vconst.
GetGlobal(GlobalIndex)
A global.get of another global.
RefNullConst
A ref.null.
RefFunc(FuncIndex)
A ref.func <index>.
Import
< The global is imported from, and thus initialized by, a different module.
Trait Implementations§
Source§impl Clone for GlobalInit
impl Clone for GlobalInit
Source§fn clone(&self) -> GlobalInit
fn clone(&self) -> GlobalInit
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GlobalInit
impl Debug for GlobalInit
Source§impl Hash for GlobalInit
impl Hash for GlobalInit
impl Copy for GlobalInit
Auto Trait Implementations§
impl Freeze for GlobalInit
impl RefUnwindSafe for GlobalInit
impl Send for GlobalInit
impl Sync for GlobalInit
impl Unpin for GlobalInit
impl UnwindSafe for GlobalInit
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