Union ValRaw
#[repr(C)]
pub union ValRaw {
/* private fields */
}
Expand description
A “raw” and unsafe representation of a WebAssembly value.
This is provided for use with the Func::new_unchecked
and
Func::call_unchecked
APIs. In general it’s unlikely you should be using
this from Rust, rather using APIs like Func::wrap
and TypedFunc::call
.
This is notably an “unsafe” way to work with Val
and it’s recommended to
instead use Val
where possible. An important note about this union is that
fields are all stored in little-endian format, regardless of the endianness
of the host system.
Implementations§
§impl ValRaw
impl ValRaw
pub fn get_funcref(&self) -> *mut c_void
pub fn get_funcref(&self) -> *mut c_void
Gets the WebAssembly funcref
value
pub fn get_externref(&self) -> u32
pub fn get_externref(&self) -> u32
Gets the WebAssembly externref
value
pub fn get_anyref(&self) -> u32
pub fn get_anyref(&self) -> u32
Gets the WebAssembly anyref
value
Trait Implementations§
impl Copy for ValRaw
impl Send for ValRaw
impl Sync for ValRaw
Auto Trait Implementations§
impl Freeze for ValRaw
impl RefUnwindSafe for ValRaw
impl Unpin for ValRaw
impl UnwindSafe for ValRaw
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