Struct wasmer::GlobalType[][src]

pub struct GlobalType {
    pub ty: Type,
    pub mutability: Mutability,
}

WebAssembly global.

Fields

ty: Type

The type of the value stored in the global.

mutability: Mutability

A flag indicating whether the value may change at runtime.

Implementations

impl GlobalType[src]

A WebAssembly global descriptor.

This type describes an instance of a global in a WebAssembly module. Globals are local to an Instance and are either immutable or mutable.

pub fn new(ty: Type, mutability: Mutability) -> GlobalType[src]

Create a new Global variable

Usage:

use wasmer_types::{GlobalType, Type, Mutability, Value};

// An I32 constant global
let global = GlobalType::new(Type::I32, Mutability::Const);
// An I64 mutable global
let global = GlobalType::new(Type::I64, Mutability::Var);

Trait Implementations

impl Clone for GlobalType[src]

impl Copy for GlobalType[src]

impl Debug for GlobalType[src]

impl<'de> Deserialize<'de> for GlobalType[src]

impl Display for GlobalType[src]

impl Eq for GlobalType[src]

impl Hash for GlobalType[src]

impl PartialEq<GlobalType> for GlobalType[src]

impl Serialize for GlobalType[src]

impl StructuralEq for GlobalType[src]

impl StructuralPartialEq for GlobalType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,