pub struct GlobalType { /* private fields */ }
Expand description

Defines the type of a wasm global variable.

A GlobalType classifies a global variable that hold a value and can either be mutable or immutable.

Implementations§

Create a new GlobalType to be associated with the given ValType and Mutability.

Arguments
  • val_type - The value type of the global variable.

  • mutability - The mutability of the global variable.

Errors

If fail to create a new GlobalType, then an error is returned.

Returns the value type of the GlobalType.

Returns the Mutability value of the GlobalType.

Provides a raw pointer to the inner global type context.

Trait Implementations§

Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more
Converts to this type from the input type.
Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.