Struct wasmedge_sys::WasmValue

source ·
pub struct WasmValue { /* private fields */ }
Expand description

Defines a WebAssembly value.

Implementations§

Returns the raw WasmEdge_Value.

Returns the type of a WasmValue.

Creates a WasmValue from a i32 value.

Argument
  • val - The source i32 value.

Generates a i32 value from a WasmValue.

Creates a WasmValue from a i64 value.

Argument
  • val - The source i64 value.

Generates a i64 value from a WasmValue.

Creates a WasmValue from a f32 value.

Argument
  • val - The source f32 value.

Generates a f32 value from a WasmValue.

Creates a WasmValue from a f64 value.

Argument
  • val - The source f64 value.

Generates a f64 value from a WasmValue.

Creates a WasmValue from a i128 value.

Argument
  • val - The source i128 value.

Generates a v128 value from a WasmValue.

Creates a WasmValue from a RefType value.

Argument
  • val - The [RefType`] value.

Checks if a WasmValue is NullRef or not.

Creates a WasmValue from a FuncRef.

Notice that the WasmValues generated from FuncRefs are only meaningful when the bulk_memory_operations or reference_types option is enabled in the Config.

Argument

Returns the FuncRef(crate::FuncRef).

If the WasmValue is a NullRef, then None is returned.

Creates a WasmValue from a reference to an external object.

The WasmValues generated by this function are only meaningful when the reference_types option is enabled in the Config.

Argument
  • extern_obj - The reference to an external object.

Returns the reference to an external object.

If the WasmValue is a NullRef, then None is returned.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.