Struct wasm_encoder::ComponentFuncTypeEncoder
source · pub struct ComponentFuncTypeEncoder<'a>(_);
Expand description
Used to encode component function types.
Implementations
sourceimpl<'a> ComponentFuncTypeEncoder<'a>
impl<'a> ComponentFuncTypeEncoder<'a>
sourcepub fn params<'b, P, T>(&mut self, params: P) -> &mut Selfwhere
P: IntoIterator<Item = (&'b str, T)>,
P::IntoIter: ExactSizeIterator,
T: Into<ComponentValType>,
pub fn params<'b, P, T>(&mut self, params: P) -> &mut Selfwhere
P: IntoIterator<Item = (&'b str, T)>,
P::IntoIter: ExactSizeIterator,
T: Into<ComponentValType>,
Defines named parameters.
Parameters must be defined before defining results.
sourcepub fn result(&mut self, ty: impl Into<ComponentValType>) -> &mut Self
pub fn result(&mut self, ty: impl Into<ComponentValType>) -> &mut Self
Defines a single unnamed result.
This method cannot be used with results
.
sourcepub fn results<'b, R, T>(&mut self, results: R) -> &mut Selfwhere
R: IntoIterator<Item = (&'b str, T)>,
R::IntoIter: ExactSizeIterator,
T: Into<ComponentValType>,
pub fn results<'b, R, T>(&mut self, results: R) -> &mut Selfwhere
R: IntoIterator<Item = (&'b str, T)>,
R::IntoIter: ExactSizeIterator,
T: Into<ComponentValType>,
Defines named results.
This method cannot be used with result
.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for ComponentFuncTypeEncoder<'a>
impl<'a> Send for ComponentFuncTypeEncoder<'a>
impl<'a> Sync for ComponentFuncTypeEncoder<'a>
impl<'a> Unpin for ComponentFuncTypeEncoder<'a>
impl<'a> !UnwindSafe for ComponentFuncTypeEncoder<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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