use super::RIType;
use crate::wasm_interface::{FunctionContext, Result};
pub trait IntoFFIValue: RIType {
fn into_ffi_value(
value: Self::Inner,
context: &mut dyn FunctionContext,
) -> Result<Self::FFIType>;
}
pub trait FromFFIValue<'a>: RIType {
type Owned;
fn from_ffi_value(context: &mut dyn FunctionContext, arg: Self::FFIType)
-> Result<Self::Owned>;
fn take_from_owned(owned: &'a mut Self::Owned) -> Self::Inner;
#[inline]
fn write_back_into_runtime(
_value: Self::Owned,
_context: &mut dyn FunctionContext,
_arg: Self::FFIType,
) -> Result<()> {
Ok(())
}
}