Struct wasmedge_sdk::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) -> 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.
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§fn default() -> GlobalType
fn default() -> GlobalType
Returns the “default value” for a type. Read more
source§impl From<GlobalType> for GlobalType
impl From<GlobalType> for GlobalType
source§fn from(ty: GlobalType) -> GlobalType
fn from(ty: GlobalType) -> GlobalType
Converts to this type from the input type.
source§impl PartialEq for GlobalType
impl PartialEq 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 ==
.impl Eq for GlobalType
impl StructuralEq for GlobalType
impl StructuralPartialEq for GlobalType
Auto Trait Implementations§
impl RefUnwindSafe for GlobalType
impl Send for GlobalType
impl Sync for GlobalType
impl Unpin for GlobalType
impl UnwindSafe for GlobalType
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more