Struct nyar_wasm::ExternalType
source · pub struct ExternalType {
pub module: WasmSymbol,
pub field: WasmSymbol,
pub alias: Option<WasmSymbol>,
pub input: Vec<ParameterType>,
pub output: Vec<WasmType>,
}Expand description
@ffi("module", "field")
Fields§
§module: WasmSymbol§field: WasmSymbol§alias: Option<WasmSymbol>§input: Vec<ParameterType>§output: Vec<WasmType>Implementations§
source§impl ExternalType
impl ExternalType
pub fn new(module: &str, field: &str) -> ExternalType
pub fn name(&self) -> &str
pub fn with_alias<S: Into<WasmSymbol>>(self, alias: S) -> Self
pub fn with_input<I>(self, inputs: I) -> Selfwhere
I: IntoIterator<Item = ParameterType>,
pub fn with_output<I>(self, outputs: I) -> Selfwhere
I: IntoIterator<Item = WasmType>,
Trait Implementations§
source§impl<'a, 'i> IntoWasm<'a, FunctionType<'i>> for ExternalTypewhere
'a: 'i,
impl<'a, 'i> IntoWasm<'a, FunctionType<'i>> for ExternalTypewhere
'a: 'i,
fn as_wast(&'a self) -> FunctionType<'i>
source§impl<'a, 'i> IntoWasm<'a, Import<'i>> for ExternalTypewhere
'a: 'i,
impl<'a, 'i> IntoWasm<'a, Import<'i>> for ExternalTypewhere
'a: 'i,
source§impl WasmItem for ExternalType
impl WasmItem for ExternalType
fn register(self, builder: &mut WasmBuilder)
Auto Trait Implementations§
impl RefUnwindSafe for ExternalType
impl Send for ExternalType
impl Sync for ExternalType
impl Unpin for ExternalType
impl UnwindSafe for ExternalType
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