pub trait GeneralWasmScriptEnv {
// Required methods
fn call_if_instantiated_0<Rets: WasmTypeList>(
&mut self,
handle: &Handle<WasmScript>,
function_name: &str,
) -> Result<Rets, Error>;
fn call_if_instantiated_1<S0: FromToNativeWasmType, Rets: WasmTypeList>(
&mut self,
handle: &Handle<WasmScript>,
function_name: &str,
s0: S0,
) -> Result<Rets, Error>
where S0::Native: NativeWasmTypeInto + FromToNativeWasmType;
fn call_if_instantiated_2<S0: FromToNativeWasmType, S1: FromToNativeWasmType, Rets: WasmTypeList>(
&mut self,
handle: &Handle<WasmScript>,
function_name: &str,
s0: S0,
s1: S1,
) -> Result<Rets, Error>
where S0::Native: NativeWasmTypeInto + FromToNativeWasmType,
S1::Native: NativeWasmTypeInto + FromToNativeWasmType;
fn call_if_instantiated_3<S0: FromToNativeWasmType, S1: FromToNativeWasmType, S2: FromToNativeWasmType, Rets: WasmTypeList>(
&mut self,
handle: &Handle<WasmScript>,
function_name: &str,
s0: S0,
s1: S1,
s2: S2,
) -> Result<Rets, Error>
where S0::Native: NativeWasmTypeInto + FromToNativeWasmType,
S1::Native: NativeWasmTypeInto + FromToNativeWasmType,
S2::Native: NativeWasmTypeInto + FromToNativeWasmType;
fn call_if_instantiated_4<S0: FromToNativeWasmType, S1: FromToNativeWasmType, S2: FromToNativeWasmType, S3: FromToNativeWasmType, Rets: WasmTypeList>(
&mut self,
handle: &Handle<WasmScript>,
function_name: &str,
s0: S0,
s1: S1,
s2: S2,
s3: S3,
) -> Result<Rets, Error>
where S0::Native: NativeWasmTypeInto + FromToNativeWasmType,
S1::Native: NativeWasmTypeInto + FromToNativeWasmType,
S2::Native: NativeWasmTypeInto + FromToNativeWasmType,
S3::Native: NativeWasmTypeInto + FromToNativeWasmType;
fn call_if_instantiated_5<S0: FromToNativeWasmType, S1: FromToNativeWasmType, S2: FromToNativeWasmType, S3: FromToNativeWasmType, S4: FromToNativeWasmType, Rets: WasmTypeList>(
&mut self,
handle: &Handle<WasmScript>,
function_name: &str,
s0: S0,
s1: S1,
s2: S2,
s3: S3,
s4: S4,
) -> Result<Rets, Error>
where S0::Native: NativeWasmTypeInto + FromToNativeWasmType,
S1::Native: NativeWasmTypeInto + FromToNativeWasmType,
S2::Native: NativeWasmTypeInto + FromToNativeWasmType,
S3::Native: NativeWasmTypeInto + FromToNativeWasmType,
S4::Native: NativeWasmTypeInto + FromToNativeWasmType;
}
Required Methods§
Sourcefn call_if_instantiated_0<Rets: WasmTypeList>(
&mut self,
handle: &Handle<WasmScript>,
function_name: &str,
) -> Result<Rets, Error>
fn call_if_instantiated_0<Rets: WasmTypeList>( &mut self, handle: &Handle<WasmScript>, function_name: &str, ) -> Result<Rets, Error>
This will call the associated script’s named function, with the provided arguments.
If the associated script is not loaded or not fully instantiated, an error will be returned.
Errors from the executed script function may also be returned.
fn call_if_instantiated_1<S0: FromToNativeWasmType, Rets: WasmTypeList>( &mut self, handle: &Handle<WasmScript>, function_name: &str, s0: S0, ) -> Result<Rets, Error>
fn call_if_instantiated_2<S0: FromToNativeWasmType, S1: FromToNativeWasmType, Rets: WasmTypeList>(
&mut self,
handle: &Handle<WasmScript>,
function_name: &str,
s0: S0,
s1: S1,
) -> Result<Rets, Error>where
S0::Native: NativeWasmTypeInto + FromToNativeWasmType,
S1::Native: NativeWasmTypeInto + FromToNativeWasmType,
fn call_if_instantiated_3<S0: FromToNativeWasmType, S1: FromToNativeWasmType, S2: FromToNativeWasmType, Rets: WasmTypeList>(
&mut self,
handle: &Handle<WasmScript>,
function_name: &str,
s0: S0,
s1: S1,
s2: S2,
) -> Result<Rets, Error>where
S0::Native: NativeWasmTypeInto + FromToNativeWasmType,
S1::Native: NativeWasmTypeInto + FromToNativeWasmType,
S2::Native: NativeWasmTypeInto + FromToNativeWasmType,
fn call_if_instantiated_4<S0: FromToNativeWasmType, S1: FromToNativeWasmType, S2: FromToNativeWasmType, S3: FromToNativeWasmType, Rets: WasmTypeList>(
&mut self,
handle: &Handle<WasmScript>,
function_name: &str,
s0: S0,
s1: S1,
s2: S2,
s3: S3,
) -> Result<Rets, Error>where
S0::Native: NativeWasmTypeInto + FromToNativeWasmType,
S1::Native: NativeWasmTypeInto + FromToNativeWasmType,
S2::Native: NativeWasmTypeInto + FromToNativeWasmType,
S3::Native: NativeWasmTypeInto + FromToNativeWasmType,
fn call_if_instantiated_5<S0: FromToNativeWasmType, S1: FromToNativeWasmType, S2: FromToNativeWasmType, S3: FromToNativeWasmType, S4: FromToNativeWasmType, Rets: WasmTypeList>(
&mut self,
handle: &Handle<WasmScript>,
function_name: &str,
s0: S0,
s1: S1,
s2: S2,
s3: S3,
s4: S4,
) -> Result<Rets, Error>where
S0::Native: NativeWasmTypeInto + FromToNativeWasmType,
S1::Native: NativeWasmTypeInto + FromToNativeWasmType,
S2::Native: NativeWasmTypeInto + FromToNativeWasmType,
S3::Native: NativeWasmTypeInto + FromToNativeWasmType,
S4::Native: NativeWasmTypeInto + FromToNativeWasmType,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.