pub unsafe trait Lower: ComponentType { }
runtime
and component-model
only.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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
impl Lower for bool
impl Lower for char
impl Lower for f32
impl Lower for f64
impl Lower for i8
impl Lower for i16
impl Lower for i32
impl Lower for i64
impl Lower for str
impl Lower for u8
impl Lower for u16
impl Lower for u32
impl Lower for u64
impl Lower for ()
impl Lower for String
impl<A1> Lower for (A1,)where
A1: Lower,
impl<A1, A2> Lower for (A1, A2)
impl<A1, A2, A3> Lower for (A1, A2, A3)
impl<A1, A2, A3, A4> Lower for (A1, A2, A3, A4)
impl<A1, A2, A3, A4, A5> Lower for (A1, A2, A3, A4, A5)
impl<A1, A2, A3, A4, A5, A6> Lower for (A1, A2, A3, A4, A5, A6)
impl<A1, A2, A3, A4, A5, A6, A7> Lower for (A1, A2, A3, A4, A5, A6, A7)
impl<A1, A2, A3, A4, A5, A6, A7, A8> Lower for (A1, A2, A3, A4, A5, A6, A7, A8)
impl<A1, A2, A3, A4, A5, A6, A7, A8, A9> Lower for (A1, A2, A3, A4, A5, A6, A7, A8, A9)
impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10> Lower for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)
impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11> Lower for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11)
impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12> Lower for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)
impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13> Lower for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13)
impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14> Lower for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14)
impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15> Lower for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15)
impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16> Lower for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16)
impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17> Lower for (A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17)
impl<T> Lower for Option<T>where
T: Lower,
impl<T> Lower for [T]where
T: Lower,
impl<T, E> Lower for Result<T, E>
impl<T: Lower + ?Sized> Lower for &T
impl<T: Lower + ?Sized> Lower for Box<T>
impl<T: Lower + ?Sized> Lower for Rc<T>
impl<T: Lower + ?Sized> Lower for Arc<T>
impl<T: Lower> Lower for Vec<T>
Implementors§
impl Lower for wasmtime::component::bindgen_examples::_3_interface_imports::example::interface_imports::logging::Level
docsrs
only.impl Lower for wasmtime::component::bindgen_examples::_4_imported_resources::example::imported_resources::logging::Level
docsrs
only.impl Lower for wasmtime::component::bindgen_examples::_6_exported_resources::exports::example::exported_resources::logging::Level
docsrs
only.