[−][src]Struct wasmer_runtime::wasm::Global
A handle to a Wasm Global
Implementations
impl Global[src]
pub fn new(value: Value<Function>) -> Global[src]
pub fn new_mutable(value: Value<Function>) -> Global[src]
pub fn descriptor(&self) -> GlobalDescriptor[src]
Get the GlobalDescriptor generated for this global.
pub fn set(&self, value: Value<Function>)[src]
Set the value help by this global.
This method will panic if the value is the wrong type.
pub fn get(&self) -> Value<Function>[src]
Get the value held by this global.
Example
let global = Global::new_mutable(Value::I32(42)); assert_eq!(global.get(), Value::I32(42)); global.set(Value::I32(7)); assert_eq!(global.get(), Value::I32(7));
Trait Implementations
impl Clone for Global[src]
impl Debug for Global[src]
impl<'a> Exportable<'a> for Global[src]
fn to_export(&self) -> Export[src]
fn get_self_from_extern(r#extern: &'a Extern) -> Result<&'a Global, ExportError>[src]
impl<'_> From<&'_ Global> for Global[src]
Auto Trait Implementations
impl !RefUnwindSafe for Global
impl Send for Global
impl Sync for Global
impl Unpin for Global
impl !UnwindSafe for Global
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,