#[repr(C)]pub struct wasmtime_val_t {
pub kind: wasmtime_valkind_t,
pub of: wasmtime_val_union,
}Fields§
§kind: wasmtime_valkind_t§of: wasmtime_val_unionImplementations§
Source§impl wasmtime_val_t
impl wasmtime_val_t
Sourcepub fn from_val(cx: impl AsContextMut, val: Val) -> wasmtime_val_t
pub fn from_val(cx: impl AsContextMut, val: Val) -> wasmtime_val_t
Creates a new wasmtime_val_t from a wasmtime::Val (non-gc version).
When gc feature is disabled, this does not require a RootScope.
Sourcepub fn from_val_unscoped(cx: impl AsContextMut, val: Val) -> wasmtime_val_t
pub fn from_val_unscoped(cx: impl AsContextMut, val: Val) -> wasmtime_val_t
Equivalent of wasmtime_val_t::from_val except that a RootScope
is not required.
This method should only be used when a RootScope is known to be
elsewhere on the stack. For example this is used when we call back out
to the embedder. In such a situation we know we previously entered with
some other call so the root scope is on the stack there.
Sourcepub unsafe fn to_val(&self, cx: impl AsContextMut) -> Val
pub unsafe fn to_val(&self, cx: impl AsContextMut) -> Val
Convert this wasmtime_val_t into a wasmtime::Val (non-gc version).
When gc feature is disabled, this does not require a RootScope.
Sourcepub unsafe fn to_val_unscoped(&self, cx: impl AsContextMut) -> Val
pub unsafe fn to_val_unscoped(&self, cx: impl AsContextMut) -> Val
Equivalent of to_val except doesn’t require a RootScope.
See notes on wasmtime_val_t::from_val_unscoped for notes on when to
use this.
Auto Trait Implementations§
impl Freeze for wasmtime_val_t
impl RefUnwindSafe for wasmtime_val_t
impl Send for wasmtime_val_t
impl Sync for wasmtime_val_t
impl Unpin for wasmtime_val_t
impl UnsafeUnpin for wasmtime_val_t
impl UnwindSafe for wasmtime_val_t
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