Struct GlobalType
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§
§impl GlobalType
impl GlobalType
pub 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.
pub fn mutability(&self) -> Mutability
pub fn mutability(&self) -> Mutability
Returns whether or not this global is mutable.
Trait Implementations§
§impl Clone for GlobalType
impl Clone for GlobalType
§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 more§impl Debug for GlobalType
impl Debug for GlobalType
§impl From<GlobalType> for ExternType
impl From<GlobalType> for ExternType
§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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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