Trait sp_runtime_interface::host::FromFFIValue
source · pub trait FromFFIValue: RIType {
type SelfInstance;
// Required method
fn from_ffi_value(
context: &mut dyn FunctionContext,
arg: Self::FFIType
) -> Result<Self::SelfInstance>;
}
Expand description
Something that can be created from a ffi value.
Implementations are safe to assume that the arg
given to from_ffi_value
is only generated by the corresponding wasm::IntoFFIValue
implementation.
Required Associated Types§
sourcetype SelfInstance
type SelfInstance
As Self
can be an unsized type, it needs to be represented by a sized type at the host.
This SelfInstance
is the sized type.
Required Methods§
sourcefn from_ffi_value(
context: &mut dyn FunctionContext,
arg: Self::FFIType
) -> Result<Self::SelfInstance>
fn from_ffi_value( context: &mut dyn FunctionContext, arg: Self::FFIType ) -> Result<Self::SelfInstance>
Create SelfInstance
from the given