use mun_memory::Type;
use crate::Runtime;
use std::ptr::NonNull;
pub trait Marshal<'t>: Sized {
type MunType;
fn marshal_from<'r>(value: Self::MunType, runtime: &'r Runtime) -> Self
where
Self: 't,
'r: 't;
fn marshal_into(self) -> Self::MunType;
fn marshal_from_ptr<'r>(
ptr: NonNull<Self::MunType>,
runtime: &'r Runtime,
type_info: &Type,
) -> Self
where
Self: 't,
'r: 't;
fn marshal_to_ptr(value: Self, ptr: NonNull<Self::MunType>, type_info: &Type);
}