Struct wasm_encoder::ComponentFuncTypeEncoder
source · pub struct ComponentFuncTypeEncoder<'a>(_);
Expand description
Used to encode component function types.
Implementations§
source§impl<'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
.