Struct wasmer_vm::VMGlobalDefinition[][src]

#[repr(C, align(16))]
pub struct VMGlobalDefinition { /* fields omitted */ }
Expand description

The storage for a WebAssembly global defined within the instance.

TODO: Pack the globals more densely, rather than using the same size for every type.

Implementations

Construct a VMGlobalDefinition.

Return the value as an i32.

If this is not an I32 typed global it is unspecified what value is returned.

Return a mutable reference to the value as an i32.

Safety

It is the callers responsibility to make sure the global has I32 type. Until the returned borrow is dropped, reads and writes of this global must be done exclusively through this borrow. That includes reads and writes of globals inside wasm functions.

Return a reference to the value as an u32.

If this is not an I32 typed global it is unspecified what value is returned.

Return a mutable reference to the value as an u32.

Safety

It is the callers responsibility to make sure the global has I32 type. Until the returned borrow is dropped, reads and writes of this global must be done exclusively through this borrow. That includes reads and writes of globals inside wasm functions.

Return a reference to the value as an i64.

If this is not an I64 typed global it is unspecified what value is returned.

Return a mutable reference to the value as an i64.

Safety

It is the callers responsibility to make sure the global has I32 type. Until the returned borrow is dropped, reads and writes of this global must be done exclusively through this borrow. That includes reads and writes of globals inside wasm functions.

Return a reference to the value as an u64.

If this is not an I64 typed global it is unspecified what value is returned.

Return a mutable reference to the value as an u64.

Safety

It is the callers responsibility to make sure the global has I64 type. Until the returned borrow is dropped, reads and writes of this global must be done exclusively through this borrow. That includes reads and writes of globals inside wasm functions.

Return a reference to the value as an f32.

If this is not an F32 typed global it is unspecified what value is returned.

Return a mutable reference to the value as an f32.

Safety

It is the callers responsibility to make sure the global has F32 type. Until the returned borrow is dropped, reads and writes of this global must be done exclusively through this borrow. That includes reads and writes of globals inside wasm functions.

Return a reference to the value as an f64.

If this is not an F64 typed global it is unspecified what value is returned.

Return a mutable reference to the value as an f64.

Safety

It is the callers responsibility to make sure the global has F64 type. Until the returned borrow is dropped, reads and writes of this global must be done exclusively through this borrow. That includes reads and writes of globals inside wasm functions.

Return a reference to the value as a VMFuncRef.

If this is not a VMFuncRef typed global it is unspecified what value is returned.

Return a mutable reference to the value as a VMFuncRef.

Safety

It is the callers responsibility to make sure the global has VMFuncRef type. Until the returned borrow is dropped, reads and writes of this global must be done exclusively through this borrow. That includes reads and writes of globals inside wasm functions.

Return a mutable reference to the value as an VMExternRef.

Safety

It is the callers responsibility to make sure the global has I32 type. Until the returned borrow is dropped, reads and writes of this global must be done exclusively through this borrow. That includes reads and writes of globals inside wasm functions.

Return a reference to the value as an VMExternRef.

If this is not an I64 typed global it is unspecified what value is returned.

Return a reference to the value as an u128.

If this is not an V128 typed global it is unspecified what value is returned.

Return a mutable reference to the value as an u128.

Safety

It is the callers responsibility to make sure the global has V128 type. Until the returned borrow is dropped, reads and writes of this global must be done exclusively through this borrow. That includes reads and writes of globals inside wasm functions.

Return a reference to the value as bytes.

Return a mutable reference to the value as bytes.

Safety

Until the returned borrow is dropped, reads and writes of this global must be done exclusively through this borrow. That includes reads and writes of globals inside wasm functions.

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

Returns the size of the referenced value in bytes. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

The archived version of the pointer metadata for this type.

Converts some archived metadata to the pointer metadata for itself.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Deserializes using the given deserializer

Performs the conversion.

Performs the conversion.

The type for metadata in pointers and references to Self.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.