pub unsafe trait Lower: ComponentType { }
Expand description
Host types which can be passed to WebAssembly components.
This trait is implemented for all types that can be passed to components either as parameters of component exports or returns of component imports. This trait represents the ability to convert from the native host representation to the canonical ABI.
Built-in types to Rust such as Option<T>
implement this trait as
appropriate. For a mapping of component model to Rust types see
ComponentType
.
For user-defined types, for example record
types mapped to Rust struct
s,
this crate additionally has
#[derive(Lower)]
.
Note that like ComponentType
the definition of this trait is intended to
be an internal implementation detail of Wasmtime at this time. It’s
recommended to use the #[derive(Lower)]
implementation instead.