pub struct ConvertAndReturnAs<T, U, V>(/* private fields */);Expand description
Return T through the FFI boundary by first converting it to U and then to V on the
host’s side, and then converting it back to U and then to T in the runtime.
This is useful to pass types when the conversion to/from FFI type cannot be implemented directly, e.g. because of the orphan rule.
Raw FFI type: same as V’s FFI type
Trait Implementations§
Source§impl<T, U, V> IntoFFIValue for ConvertAndReturnAs<T, U, V>
Available on non-substrate_runtime only.
impl<T, U, V> IntoFFIValue for ConvertAndReturnAs<T, U, V>
Available on non-
substrate_runtime only.Source§fn 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.Auto Trait Implementations§
impl<T, U, V> Freeze for ConvertAndReturnAs<T, U, V>
impl<T, U, V> RefUnwindSafe for ConvertAndReturnAs<T, U, V>
impl<T, U, V> Send for ConvertAndReturnAs<T, U, V>
impl<T, U, V> Sync for ConvertAndReturnAs<T, U, V>
impl<T, U, V> Unpin for ConvertAndReturnAs<T, U, V>
impl<T, U, V> UnsafeUnpin for ConvertAndReturnAs<T, U, V>
impl<T, U, V> UnwindSafe for ConvertAndReturnAs<T, U, V>
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