[−][src]Struct wasmer_runtime_c_api::value::wasmer_value_t
Represents a WebAssembly type and value pair,
i.e. wasmer_value_tag and wasmer_value. Since the latter is an
union, it's the safe way to read or write a WebAssembly value in
C.
Example:
// Create a WebAssembly value.
wasmer_value_t wasm_value = {
.tag = WASM_I32,
.value.I32 = 42,
};
// Read a WebAssembly value.
if (wasm_value.tag == WASM_I32) {
int32_t x = wasm_value.value.I32;
// …
}
Fields
tag: wasmer_value_tagThe value type.
value: wasmer_valueThe value.
Trait Implementations
impl Clone for wasmer_value_t[src]
fn clone(&self) -> wasmer_value_t[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl From<Value> for wasmer_value_t[src]
impl From<wasmer_value_t> for Value[src]
fn from(v: wasmer_value_t) -> Self[src]
Auto Trait Implementations
impl RefUnwindSafe for wasmer_value_t
impl Send for wasmer_value_t
impl Sync for wasmer_value_t
impl Unpin for wasmer_value_t
impl UnwindSafe for wasmer_value_t
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,