Struct wasm_encoder::component::TypeEncoder
source · [−]pub struct TypeEncoder<'a>(_);
Expand description
Used to encode types.
Implementations
sourceimpl<'a> TypeEncoder<'a>
impl<'a> TypeEncoder<'a>
sourcepub fn instance(self, ty: &InstanceType)
pub fn instance(self, ty: &InstanceType)
Define an instance type.
sourcepub fn module(self, ty: &ModuleType)
pub fn module(self, ty: &ModuleType)
Define a module type.
sourcepub fn adapter_function(
self,
params: &[(&str, InterfaceType)],
results: &[(Option<&str>, InterfaceType)]
)
pub fn adapter_function(
self,
params: &[(&str, InterfaceType)],
results: &[(Option<&str>, InterfaceType)]
)
Define an adapter function type.
Panics
This function panics if the given results are not all unnamed (i.e. None
) or
all named (i.e. Some
).
sourcepub fn compound(self) -> CompoundTypeEncoder<'a>
pub fn compound(self) -> CompoundTypeEncoder<'a>
Define a compound type.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for TypeEncoder<'a>
impl<'a> Send for TypeEncoder<'a>
impl<'a> Sync for TypeEncoder<'a>
impl<'a> Unpin for TypeEncoder<'a>
impl<'a> !UnwindSafe for TypeEncoder<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more