Module rtypes

Module rtypes 

Source
Expand description

The Rust representation of a component type (etype)

Functionsยง

emit_func_param
Emit a Rust argument declaration, suitable for placing in the argument list of a function, for a given component function type parameter.
emit_func_result
Emit a Rust version of a component function return type.
emit_toplevel
See [emit_component]
emit_value
Emit a Rust type corresponding to a given value type. The resultant token stream will parse as a Rust type.
emit_var_ref
Emit a token stream that references the given type variable in a type context, either directly if it is locally defined or by adding a parameter to the current type/trait/etc if necessary.
emit_var_ref_noff
Emit a token stream that references the given bound type variable, either directly if it is locally defined or by adding a parameter to the current type/trait/etc if necessary.
emit_var_ref_value
Emit a token stream that references the given type variable in a value context (e.g. a constructor), either directly if it is locally defined or by adding a parameter to the current type/trait/etc if necessary.
numeric_rtype
Format the name of the rust type corresponding to a component numeric type.