Struct wasm_encoder::ComponentTypeEncoder
source · [−]pub struct ComponentTypeEncoder<'a>(_);
Expand description
Used to encode component and instance types.
Implementations
sourceimpl<'a> ComponentTypeEncoder<'a>
impl<'a> ComponentTypeEncoder<'a>
sourcepub fn component(self, ty: &ComponentType)
pub fn component(self, ty: &ComponentType)
Define a component type.
sourcepub fn instance(self, ty: &InstanceType)
pub fn instance(self, ty: &InstanceType)
Define an instance type.
sourcepub fn function<'b, P, T>(self, params: P, result: impl Into<ComponentValType>) where
P: IntoIterator<Item = (Option<&'b str>, T)>,
P::IntoIter: ExactSizeIterator,
T: Into<ComponentValType>,
pub fn function<'b, P, T>(self, params: P, result: impl Into<ComponentValType>) where
P: IntoIterator<Item = (Option<&'b str>, T)>,
P::IntoIter: ExactSizeIterator,
T: Into<ComponentValType>,
Define a function type.
sourcepub fn defined_type(self) -> ComponentDefinedTypeEncoder<'a>
pub fn defined_type(self) -> ComponentDefinedTypeEncoder<'a>
Define a defined component type.
The returned encoder must be used before adding another type.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for ComponentTypeEncoder<'a>
impl<'a> Send for ComponentTypeEncoder<'a>
impl<'a> Sync for ComponentTypeEncoder<'a>
impl<'a> Unpin for ComponentTypeEncoder<'a>
impl<'a> !UnwindSafe for ComponentTypeEncoder<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more