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.
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more