Struct wasmtime::GlobalType
source · pub struct GlobalType { /* private fields */ }
Expand description
A WebAssembly global descriptor.
This type describes an instance of a global in a WebAssembly module. Globals
are local to an Instance
and are either immutable or
mutable.
Implementations§
source§impl GlobalType
impl GlobalType
sourcepub fn new(content: ValType, mutability: Mutability) -> GlobalType
pub fn new(content: ValType, mutability: Mutability) -> GlobalType
Creates a new global descriptor of the specified content
type and
whether or not it’s mutable.
sourcepub fn mutability(&self) -> Mutability
pub fn mutability(&self) -> Mutability
Returns whether or not this global is mutable.
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 From<GlobalType> for ExternType
impl From<GlobalType> for ExternType
source§fn from(ty: GlobalType) -> ExternType
fn from(ty: GlobalType) -> ExternType
Converts to this type from the input type.
source§impl Hash for GlobalType
impl Hash 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 ==
.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
source§impl<T> CallHasher for Twhere
T: Hash + ?Sized,
impl<T> CallHasher for Twhere T: Hash + ?Sized,
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.