pub struct ComponentTypeEncoder<'a>(/* private fields */);
Available on crate feature
component-model
only.Expand description
Used to encode component and instance types.
Implementations§
Source§impl<'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(self) -> ComponentFuncTypeEncoder<'a>
pub fn function(self) -> ComponentFuncTypeEncoder<'a>
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> Freeze for ComponentTypeEncoder<'a>
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more