Enum cranelift_wasm::GlobalInit
source · pub enum GlobalInit {
I32Const(i32),
I64Const(i64),
F32Const(u32),
F64Const(u64),
V128Const(u128),
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(u128)
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 copy 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<'de> Deserialize<'de> for GlobalInit
impl<'de> Deserialize<'de> for GlobalInit
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<GlobalInit, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<GlobalInit, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for GlobalInit
impl Hash for GlobalInit
source§impl PartialEq<GlobalInit> for GlobalInit
impl PartialEq<GlobalInit> for GlobalInit
source§fn eq(&self, other: &GlobalInit) -> bool
fn eq(&self, other: &GlobalInit) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for GlobalInit
impl Serialize for GlobalInit
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for GlobalInit
impl Eq for GlobalInit
impl StructuralEq for GlobalInit
impl StructuralPartialEq for GlobalInit
Auto Trait Implementations§
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
source§impl<T> CallHasher for Twhere
T: Hash + ?Sized,
impl<T> CallHasher for Twhere T: Hash + ?Sized,
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.