Type Alias linera_witty::wasmtime::ReentrantInstance
source · pub type ReentrantInstance<'a, UserData> = Caller<'a, UserData>;
Expand description
Alias for the Instance
implementation made available inside host functions called by the
guest.
Aliased Type§
struct ReentrantInstance<'a, UserData> { /* private fields */ }
Trait Implementations§
source§impl<Parameters, Results, UserData> InstanceWithFunction<Parameters, Results> for ReentrantInstance<'_, UserData>where
Parameters: FlatLayout + WasmtimeParameters,
Results: FlatLayout + WasmtimeResults,
impl<Parameters, Results, UserData> InstanceWithFunction<Parameters, Results> for ReentrantInstance<'_, UserData>where
Parameters: FlatLayout + WasmtimeParameters,
Results: FlatLayout + WasmtimeResults,
§type Function = TypedFunc<<Parameters as WasmtimeParameters>::Parameters, <Results as WasmtimeResults>::Results>
type Function = TypedFunc<<Parameters as WasmtimeParameters>::Parameters, <Results as WasmtimeResults>::Results>
The runtime-specific type to represent the function.
source§fn function_from_export(
&mut self,
export: <Self::Runtime as Runtime>::Export,
) -> Result<Option<Self::Function>, RuntimeError>
fn function_from_export( &mut self, export: <Self::Runtime as Runtime>::Export, ) -> Result<Option<Self::Function>, RuntimeError>
Converts an export into a function, if it is one.
source§fn call(
&mut self,
function: &Self::Function,
parameters: Parameters,
) -> Result<Results, RuntimeError>
fn call( &mut self, function: &Self::Function, parameters: Parameters, ) -> Result<Results, RuntimeError>
Calls the
function
from this instance using the specified parameters
.source§fn load_function(&mut self, name: &str) -> Result<Self::Function, RuntimeError>
fn load_function(&mut self, name: &str) -> Result<Self::Function, RuntimeError>
Loads a function from the guest Wasm instance.
source§impl<UserData> InstanceWithMemory for ReentrantInstance<'_, UserData>
impl<UserData> InstanceWithMemory for ReentrantInstance<'_, UserData>
source§fn memory_from_export(
&self,
export: Extern,
) -> Result<Option<Memory>, RuntimeError>
fn memory_from_export( &self, export: Extern, ) -> Result<Option<Memory>, RuntimeError>
Converts an
export
into the runtime’s specific memory type.