Struct nyar_wasm::FunctionType
source · pub struct FunctionType {
pub symbol: WasmSymbol,
pub export: WasmExportName,
pub entry: bool,
pub input: IndexMap<String, ParameterType>,
pub local: BTreeMap<String, ParameterType>,
pub output: Vec<WasmType>,
pub body: FunctionBody,
pub span: FileSpan,
}Expand description
function
Fields§
§symbol: WasmSymbol§export: WasmExportName§entry: bool§input: IndexMap<String, ParameterType>§local: BTreeMap<String, ParameterType>§output: Vec<WasmType>§body: FunctionBody§span: FileSpanImplementations§
source§impl FunctionType
impl FunctionType
pub fn new<S: Into<WasmSymbol>>(name: S) -> Self
pub fn name(&self) -> String
pub fn with_export(self, export: bool) -> Self
pub fn with_entry(self, entry: bool) -> Self
pub fn with_inputs<I>(self, inputs: I) -> Selfwhere
I: IntoIterator<Item = ParameterType>,
pub fn with_outputs<I>(self, outputs: I) -> Selfwhere
I: IntoIterator<Item = WasmType>,
pub fn with_locals<I>(self, locals: I) -> Selfwhere
I: IntoIterator<Item = ParameterType>,
pub fn with_operations<I>(self, operations: I) -> Selfwhere
I: IntoIterator<Item = Operation>,
Trait Implementations§
source§impl<'a, 'i> IntoWasm<'a, CanonLift<'i>> for FunctionTypewhere
'a: 'i,
impl<'a, 'i> IntoWasm<'a, CanonLift<'i>> for FunctionTypewhere
'a: 'i,
source§impl<'a, 'i> IntoWasm<'a, ComponentFunctionType<'i>> for FunctionTypewhere
'a: 'i,
impl<'a, 'i> IntoWasm<'a, ComponentFunctionType<'i>> for FunctionTypewhere
'a: 'i,
fn as_wast(&'a self) -> ComponentFunctionType<'i>
source§impl<'a, 'i> IntoWasm<'a, CoreFunc<'i>> for FunctionTypewhere
'a: 'i,
impl<'a, 'i> IntoWasm<'a, CoreFunc<'i>> for FunctionTypewhere
'a: 'i,
source§impl<'a, 'i> IntoWasm<'a, CoreFuncKind<'i>> for FunctionTypewhere
'a: 'i,
impl<'a, 'i> IntoWasm<'a, CoreFuncKind<'i>> for FunctionTypewhere
'a: 'i,
fn as_wast(&'a self) -> CoreFuncKind<'i>
source§impl<'a, 'i> IntoWasm<'a, Func<'i>> for FunctionTypewhere
'a: 'i,
impl<'a, 'i> IntoWasm<'a, Func<'i>> for FunctionTypewhere
'a: 'i,
source§impl<'a, 'i> IntoWasm<'a, Func<'i>> for FunctionTypewhere
'a: 'i,
impl<'a, 'i> IntoWasm<'a, Func<'i>> for FunctionTypewhere
'a: 'i,
source§impl<'a, 'i> IntoWasm<'a, FuncKind<'i>> for FunctionTypewhere
'a: 'i,
impl<'a, 'i> IntoWasm<'a, FuncKind<'i>> for FunctionTypewhere
'a: 'i,
source§impl<'a, 'i> IntoWasm<'a, FuncKind<'i>> for FunctionTypewhere
'a: 'i,
impl<'a, 'i> IntoWasm<'a, FuncKind<'i>> for FunctionTypewhere
'a: 'i,
source§impl<'a, 'i> IntoWasm<'a, FunctionType<'i>> for FunctionTypewhere
'a: 'i,
impl<'a, 'i> IntoWasm<'a, FunctionType<'i>> for FunctionTypewhere
'a: 'i,
fn as_wast(&'a self) -> FunctionType<'i>
source§impl<'a, 'i> IntoWasm<'a, Start<'i>> for FunctionTypewhere
'a: 'i,
impl<'a, 'i> IntoWasm<'a, Start<'i>> for FunctionTypewhere
'a: 'i,
source§impl WasmItem for FunctionType
impl WasmItem for FunctionType
fn register(self, builder: &mut WasmBuilder)
Auto Trait Implementations§
impl RefUnwindSafe for FunctionType
impl Send for FunctionType
impl Sync for FunctionType
impl Unpin for FunctionType
impl UnwindSafe for FunctionType
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