Struct wasm_encoder::component::CompoundTypeEncoder
source · [−]pub struct CompoundTypeEncoder<'a>(_);
Expand description
Used for encoding compound interface types.
Implementations
sourceimpl CompoundTypeEncoder<'_>
impl CompoundTypeEncoder<'_>
sourcepub fn list(self, ty: InterfaceType)
pub fn list(self, ty: InterfaceType)
Define a list type.
sourcepub fn tuple(self, types: &[InterfaceType])
pub fn tuple(self, types: &[InterfaceType])
Define a tuple type.
sourcepub fn union(self, types: &[InterfaceType])
pub fn union(self, types: &[InterfaceType])
Define a union type.
sourcepub fn optional(self, ty: InterfaceType)
pub fn optional(self, ty: InterfaceType)
Define an optional type.
sourcepub fn expected(self, ok: Option<InterfaceType>, error: Option<InterfaceType>)
pub fn expected(self, ok: Option<InterfaceType>, error: Option<InterfaceType>)
Define an expected type.
sourcepub fn named(self, name: &str, ty: InterfaceType)
pub fn named(self, name: &str, ty: InterfaceType)
Define a named type.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for CompoundTypeEncoder<'a>
impl<'a> Send for CompoundTypeEncoder<'a>
impl<'a> Sync for CompoundTypeEncoder<'a>
impl<'a> Unpin for CompoundTypeEncoder<'a>
impl<'a> !UnwindSafe for CompoundTypeEncoder<'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