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§
Source§impl ValRaw
 
impl ValRaw
Sourcepub fn null() -> ValRaw
 Available on crate feature runtime only.
pub fn null() -> ValRaw
runtime only.Create a null reference that is compatible with any of
{any,extern,func,exn}ref.
Sourcepub fn i32(i: i32) -> ValRaw
 Available on crate feature runtime only.
pub fn i32(i: i32) -> ValRaw
runtime only.Creates a WebAssembly i32 value
Sourcepub fn i64(i: i64) -> ValRaw
 Available on crate feature runtime only.
pub fn i64(i: i64) -> ValRaw
runtime only.Creates a WebAssembly i64 value
Sourcepub fn u32(i: u32) -> ValRaw
 Available on crate feature runtime only.
pub fn u32(i: u32) -> ValRaw
runtime only.Creates a WebAssembly i32 value
Sourcepub fn u64(i: u64) -> ValRaw
 Available on crate feature runtime only.
pub fn u64(i: u64) -> ValRaw
runtime only.Creates a WebAssembly i64 value
Sourcepub fn f32(i: u32) -> ValRaw
 Available on crate feature runtime only.
pub fn f32(i: u32) -> ValRaw
runtime only.Creates a WebAssembly f32 value
Sourcepub fn f64(i: u64) -> ValRaw
 Available on crate feature runtime only.
pub fn f64(i: u64) -> ValRaw
runtime only.Creates a WebAssembly f64 value
Sourcepub fn v128(i: u128) -> ValRaw
 Available on crate feature runtime only.
pub fn v128(i: u128) -> ValRaw
runtime only.Creates a WebAssembly v128 value
Sourcepub fn funcref(i: *mut c_void) -> ValRaw
 Available on crate feature runtime only.
pub fn funcref(i: *mut c_void) -> ValRaw
runtime only.Creates a WebAssembly funcref value
Sourcepub fn externref(e: u32) -> ValRaw
 Available on crate feature runtime only.
pub fn externref(e: u32) -> ValRaw
runtime only.Creates a WebAssembly externref value
Sourcepub fn anyref(r: u32) -> ValRaw
 Available on crate feature runtime only.
pub fn anyref(r: u32) -> ValRaw
runtime only.Creates a WebAssembly anyref value
Sourcepub fn exnref(r: u32) -> ValRaw
 Available on crate feature runtime only.
pub fn exnref(r: u32) -> ValRaw
runtime only.Creates a WebAssembly exnref value
Sourcepub fn get_i32(&self) -> i32
 Available on crate feature runtime only.
pub fn get_i32(&self) -> i32
runtime only.Gets the WebAssembly i32 value
Sourcepub fn get_i64(&self) -> i64
 Available on crate feature runtime only.
pub fn get_i64(&self) -> i64
runtime only.Gets the WebAssembly i64 value
Sourcepub fn get_u32(&self) -> u32
 Available on crate feature runtime only.
pub fn get_u32(&self) -> u32
runtime only.Gets the WebAssembly i32 value
Sourcepub fn get_u64(&self) -> u64
 Available on crate feature runtime only.
pub fn get_u64(&self) -> u64
runtime only.Gets the WebAssembly i64 value
Sourcepub fn get_f32(&self) -> u32
 Available on crate feature runtime only.
pub fn get_f32(&self) -> u32
runtime only.Gets the WebAssembly f32 value
Sourcepub fn get_f64(&self) -> u64
 Available on crate feature runtime only.
pub fn get_f64(&self) -> u64
runtime only.Gets the WebAssembly f64 value
Sourcepub fn get_v128(&self) -> u128
 Available on crate feature runtime only.
pub fn get_v128(&self) -> u128
runtime only.Gets the WebAssembly v128 value
Sourcepub fn get_funcref(&self) -> *mut c_void
 Available on crate feature runtime only.
pub fn get_funcref(&self) -> *mut c_void
runtime only.Gets the WebAssembly funcref value
Sourcepub fn get_externref(&self) -> u32
 Available on crate feature runtime only.
pub fn get_externref(&self) -> u32
runtime only.Gets the WebAssembly externref value
Sourcepub fn get_anyref(&self) -> u32
 Available on crate feature runtime only.
pub fn get_anyref(&self) -> u32
runtime only.Gets the WebAssembly anyref value
Sourcepub fn get_exnref(&self) -> u32
 Available on crate feature runtime only.
pub fn get_exnref(&self) -> u32
runtime only.Gets the WebAssembly exnref value
Trait Implementations§
impl Copy for ValRaw
runtime only.impl Send for ValRaw
runtime only.impl Sync for ValRaw
runtime only.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
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
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> ⓘ
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> ⓘ
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