Struct wasmedge_sdk::GlobalType
pub struct GlobalType { /* private fields */ }
Expand description
Parses in-memory bytes as either the WebAssembly Text format, or a binary WebAssembly module Struct of WasmEdge GlobalType.
A GlobalType is used to declare the type of a WasmEdge Global to be created.
Implementations§
§impl GlobalType
impl GlobalType
pub fn new(ty: ValType, mutability: Mutability) -> GlobalType
pub fn new(ty: ValType, mutability: Mutability) -> GlobalType
Creates a new GlobalType with the given value type and mutability.
Arguments
-
ty
- The value type of the global to be created. -
mutability
- The value mutability property of the global to be created.
pub fn value_ty(&self) -> ValType
pub fn value_ty(&self) -> ValType
Returns the value type defined in the GlobalType.
pub fn mutability(&self) -> Mutability
pub fn mutability(&self) -> Mutability
Returns the value mutability property defined in the GlobalType.
Trait Implementations§
§impl Clone for GlobalType
impl Clone for GlobalType
§fn clone(&self) -> GlobalType
fn clone(&self) -> GlobalType
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Debug for GlobalType
impl Debug for GlobalType
§impl Default for GlobalType
impl Default for GlobalType
§fn default() -> GlobalType
fn default() -> GlobalType
Returns the “default value” for a type. Read more
§impl From<GlobalType> for GlobalType
impl From<GlobalType> for GlobalType
§fn from(ty: GlobalType) -> GlobalType
fn from(ty: GlobalType) -> GlobalType
Converts to this type from the input type.
§impl PartialEq<GlobalType> for GlobalType
impl PartialEq<GlobalType> for GlobalType
§fn eq(&self, other: &GlobalType) -> bool
fn eq(&self, other: &GlobalType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.