pub enum GlobalInit {
I32(i32),
I64(i64),
}Expand description
A captured constant global initializer (#649). Only INTEGER t.const init
exprs are captured: f32.const/f64.const inits deliberately decode to
None — float-typed global ACCESS is the GI-FPU-001 (#369) loud-skip lane,
and fabricating a bit-pattern here must not quietly unskip it. Non-const
init exprs (e.g. global.get of an import) are not statically known and
also decode to None.
Variants§
I32(i32)
A leading i32.const initializer.
I64(i64)
A leading i64.const initializer — BOTH words must reach the emitted
global slot (#649: init_i32-shaped capture silently zeroed these).
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for GlobalInit
Source§impl Debug for GlobalInit
impl Debug for GlobalInit
impl Eq for GlobalInit
Source§impl PartialEq for GlobalInit
impl PartialEq for GlobalInit
Source§fn eq(&self, other: &GlobalInit) -> bool
fn eq(&self, other: &GlobalInit) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq 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 UnsafeUnpin 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.