Struct wasm_encoder::ConstExpr

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

A constant expression.

Usable in contexts such as offsets or initializers.

Implementations

Create a new empty constant expression builder.

Create a constant expression with the specified raw encoding of instructions.

Create a constant expression containing a single global.get instruction.

Create a constant expression containing a single ref.null instruction.

Create a constant expression containing a single ref.func instruction.

Create a constant expression containing a single i32.const instruction.

Create a constant expression containing a single i64.const instruction.

Create a constant expression containing a single f32.const instruction.

Create a constant expression containing a single f64.const instruction.

Create a constant expression containing a single v128.const instruction.

Trait Implementations

Formats the value using the given formatter. Read more
Encode the type into the given byte sink.

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 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.