sp_runtime_interface::wasm

Trait FromFFIValue

Source
pub trait FromFFIValue: Sized + RIType {
    // Required method
    fn from_ffi_value(arg: Self::FFIType) -> Self;
}
Expand description

Something that can be created from a ffi value.

§Safety

It is unsafe behavior to call Something::into_ffi_value().get() and take this as input for from_ffi_value. Implementations are safe to assume that the arg given to from_ffi_value is only generated by the corresponding host::IntoFFIValue implementation.

Required Methods§

Source

fn from_ffi_value(arg: Self::FFIType) -> Self

Create Self from the given 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.

Implementors§