pub struct ComponentEncoder<'a> { /* private fields */ }
Expand description
An encoder of components based on wit
interface definitions.
Implementations§
Source§impl<'a> ComponentEncoder<'a>
impl<'a> ComponentEncoder<'a>
Sourcepub fn encoding(self, encoding: StringEncoding) -> Self
pub fn encoding(self, encoding: StringEncoding) -> Self
Set the string encoding expected by the core module.
Sourcepub fn validate(self, validate: bool) -> Self
pub fn validate(self, validate: bool) -> Self
Sets whether or not the encoder will validate its output.
Sourcepub fn interface(self, interface: &'a Interface) -> Self
pub fn interface(self, interface: &'a Interface) -> Self
Set the default interface exported by the component.
Sourcepub fn imports(self, imports: &'a [Interface]) -> Self
pub fn imports(self, imports: &'a [Interface]) -> Self
Set the interfaces the component imports.
Trait Implementations§
Source§impl<'a> Default for ComponentEncoder<'a>
impl<'a> Default for ComponentEncoder<'a>
Source§fn default() -> ComponentEncoder<'a>
fn default() -> ComponentEncoder<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for ComponentEncoder<'a>
impl<'a> RefUnwindSafe for ComponentEncoder<'a>
impl<'a> Send for ComponentEncoder<'a>
impl<'a> Sync for ComponentEncoder<'a>
impl<'a> Unpin for ComponentEncoder<'a>
impl<'a> UnwindSafe for ComponentEncoder<'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