pub struct WasmGlobal {
pub index: u32,
pub init_i32: Option<i32>,
pub mutable: bool,
}Expand description
A WASM global’s declaration — its initial value and mutability (#237).
Needed so the native-pointer ABI can recognize a global whose initializer is
a linear-memory address (e.g. $__stack_pointer = 65536) and make it
__synth_wasm_data-relative, rather than reading it from an R9 globals table
the self-contained drop-in object can’t rely on.
Fields§
§index: u32Global index (defined globals; imported globals are not counted here).
init_i32: Option<i32>The i32.const initializer value (other init exprs decode to None).
mutable: boolWhether the global is mutable.
Trait Implementations§
Source§impl Clone for WasmGlobal
impl Clone for WasmGlobal
Source§fn clone(&self) -> WasmGlobal
fn clone(&self) -> WasmGlobal
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 moreAuto Trait Implementations§
impl Freeze for WasmGlobal
impl RefUnwindSafe for WasmGlobal
impl Send for WasmGlobal
impl Sync for WasmGlobal
impl Unpin for WasmGlobal
impl UnsafeUnpin for WasmGlobal
impl UnwindSafe for WasmGlobal
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