Struct wasmedge_types::GlobalType
source · pub struct GlobalType { /* private fields */ }
Expand description
Struct of WasmEdge GlobalType.
A GlobalType is used to declare the type of a WasmEdge Global to be created.
Implementations§
source§impl GlobalType
impl GlobalType
sourcepub fn new(ty: ValType, mutability: Mutability) -> Self
pub fn new(ty: ValType, mutability: Mutability) -> Self
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.
sourcepub fn value_ty(&self) -> ValType
pub fn value_ty(&self) -> ValType
Returns the value type defined in the GlobalType.
sourcepub fn mutability(&self) -> Mutability
pub fn mutability(&self) -> Mutability
Returns the value mutability property defined in the GlobalType.
Trait Implementations§
source§impl Clone for GlobalType
impl Clone for GlobalType
source§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 moresource§impl Debug for GlobalType
impl Debug for GlobalType
source§impl Default for GlobalType
impl Default for GlobalType
source§impl PartialEq<GlobalType> for GlobalType
impl PartialEq<GlobalType> for GlobalType
source§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 ==
.