[][src]Trait mun_runtime::Marshal

pub trait Marshal<T>: Sized {
    fn marshal_value(self, runtime: Rc<RefCell<Runtime>>) -> T;
fn marshal_from_ptr(
        ptr: NonNull<Self>,
        runtime: Rc<RefCell<Runtime>>,
        type_info: Option<&TypeInfo>
    ) -> T;
fn marshal_to_ptr(
        value: Self,
        ptr: NonNull<Self>,
        type_info: Option<&TypeInfo>
    ); }

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 methods

fn marshal_value(self, runtime: Rc<RefCell<Runtime>>) -> T

Marshals itself into a T.

fn marshal_from_ptr(
    ptr: NonNull<Self>,
    runtime: Rc<RefCell<Runtime>>,
    type_info: Option<&TypeInfo>
) -> T

Marshals the value at memory location ptr into a T.

fn marshal_to_ptr(value: Self, ptr: NonNull<Self>, type_info: Option<&TypeInfo>)

Marshals value to memory location ptr.

Loading content...

Implementors

impl<T> Marshal<T> for T[src]

Loading content...