pub trait IntoFFIValue: RIType {
// Required method
fn into_ffi_value(
value: Self::Inner,
context: &mut dyn FunctionContext,
) -> Result<Self::FFIType>;
}
Expand description
A type used as a return value in a host function. Can be turned into an FFI value.
Required Methods§
Sourcefn into_ffi_value(
value: Self::Inner,
context: &mut dyn FunctionContext,
) -> Result<Self::FFIType>
fn into_ffi_value( value: Self::Inner, context: &mut dyn FunctionContext, ) -> Result<Self::FFIType>
Convert Self::Inner
into an FFI value.
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.
Implementations on Foreign Types§
Source§impl IntoFFIValue for bool
Available on non-substrate_runtime
only.
impl IntoFFIValue for bool
Available on non-
substrate_runtime
only.fn into_ffi_value(value: Self, _: &mut dyn FunctionContext) -> Result<u32>
Source§impl IntoFFIValue for i8
Available on non-substrate_runtime
only.
impl IntoFFIValue for i8
Available on non-
substrate_runtime
only.fn into_ffi_value( value: Self::Inner, _: &mut dyn FunctionContext, ) -> Result<i32>
Source§impl IntoFFIValue for i16
Available on non-substrate_runtime
only.
impl IntoFFIValue for i16
Available on non-
substrate_runtime
only.fn into_ffi_value( value: Self::Inner, _: &mut dyn FunctionContext, ) -> Result<i32>
Source§impl IntoFFIValue for i32
Available on non-substrate_runtime
only.
impl IntoFFIValue for i32
Available on non-
substrate_runtime
only.fn into_ffi_value( value: Self::Inner, _: &mut dyn FunctionContext, ) -> Result<i32>
Source§impl IntoFFIValue for i64
Available on non-substrate_runtime
only.
impl IntoFFIValue for i64
Available on non-
substrate_runtime
only.fn into_ffi_value( value: Self::Inner, _: &mut dyn FunctionContext, ) -> Result<i64>
Source§impl IntoFFIValue for u8
Available on non-substrate_runtime
only.
impl IntoFFIValue for u8
Available on non-
substrate_runtime
only.fn into_ffi_value( value: Self::Inner, _: &mut dyn FunctionContext, ) -> Result<u32>
Source§impl IntoFFIValue for u16
Available on non-substrate_runtime
only.
impl IntoFFIValue for u16
Available on non-
substrate_runtime
only.fn into_ffi_value( value: Self::Inner, _: &mut dyn FunctionContext, ) -> Result<u32>
Source§impl IntoFFIValue for u32
Available on non-substrate_runtime
only.
impl IntoFFIValue for u32
Available on non-
substrate_runtime
only.fn into_ffi_value( value: Self::Inner, _: &mut dyn FunctionContext, ) -> Result<u32>
Source§impl IntoFFIValue for u64
Available on non-substrate_runtime
only.
impl IntoFFIValue for u64
Available on non-
substrate_runtime
only.fn into_ffi_value( value: Self::Inner, _: &mut dyn FunctionContext, ) -> Result<u64>
Implementors§
impl<T> IntoFFIValue for AllocateAndReturnFatPointer<T>
Available on non-
substrate_runtime
only.impl<T, U> IntoFFIValue for ReturnAs<T, U>
Available on non-
substrate_runtime
only.impl<T, const N: usize> IntoFFIValue for AllocateAndReturnPointer<T, N>
Available on non-
substrate_runtime
only.impl<T: Encode> IntoFFIValue for AllocateAndReturnByCodec<T>
Available on non-
substrate_runtime
only.impl<T: PointerType> IntoFFIValue for Pointer<T>
Available on non-
substrate_runtime
only.