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