pub trait PassByImpl<T>: RIType {
    fn into_ffi_value(
        instance: T,
        context: &mut dyn FunctionContext
    ) -> Result<Self::FFIType>;
fn from_ffi_value(
        context: &mut dyn FunctionContext,
        arg: Self::FFIType
    ) -> Result<T>; }
Expand description

Something that provides a strategy for passing a type between wasm and the host.

This trait exposes the same functionality as crate::host::IntoFFIValue and crate::host::FromFFIValue to delegate the implementation for a type to a different type.

This trait is used for the host implementation.

Required methods

Convert the given instance to the ffi value.

For more information see: crate::host::IntoFFIValue::into_ffi_value

Create T from the given ffi value.

For more information see: crate::host::FromFFIValue::from_ffi_value