Module nanowasm::types [] [src]

Common traits and type definitions used everywhere in nanowasm.

Structs

ConstExpr

A constant expression; a list of ConstOpcode's.

Export

An export declaration.

Func

A runtime function able to be executed in the context of a module.

FuncIdx

An index into a module's function vector.

FuncType

A type signature for a function type, intended to go into the types section of a module.

Global

A structure containing runtime data for a global variable.

GlobalIdx

An index into a module's globals vector.

Import

An import declaration. T is generally some sort of type that says what the type and value of the import is.

Memory

A structure containing a memory space.

Table

A table.

TypeIdx

An index into a module's type vector.

Enums

ConstOpcode

A restricted subset of parity::elements::Opcode that is valid in a constant expression (ie, data initializers)

Error

Error type using the failure crate.

FuncBody
Value

An actual value used at runtime.

Traits

Extend

Convert one type to another by extending with leading zeroes or one's (depending on destination type) TODO: num's AsPrimitive trait also covers this case.

TryFrom

This should be in std by now dammit!

Wrap

A trait to say "you can convert X to this type, wrapping numbers". aka, just as. Like From but doesn't promise to preserve all data. This should already exist, dammit. Num crate is working on it: https://github.com/rust-num/num/issues/183 TODO: This now exists, see https://docs.rs/num/0.1.42/num/cast/trait.AsPrimitive.html