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
impl Eq for GlobalType
impl StructuralPartialEq for GlobalType
Auto Trait Implementations§
impl Freeze for GlobalType
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