Trait mun_runtime::Marshal

source ·
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); }
Expand description

Used to do value-to-value conversions that require runtime type information while consuming the input value.

If no TypeInfo is provided, the type is ().

Required Associated Types§

The type used in the Mun ABI

Required Methods§

Marshals from a value (i.e. Mun -> Rust).

Marshals itself into a Marshalled value (i.e. Rust -> Mun).

Marshals the value at memory location ptr into a Marshalled value (i.e. Mun -> Rust).

Marshals value to memory location ptr (i.e. Rust -> Mun).

Implementations on Foreign Types§

Implementors§