Trait mun_runtime::Marshal [−][src]
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 ()
.
Associated Types
Loading content...Required methods
fn marshal_from<'r>(value: Self::MunType, runtime: &'r Runtime) -> Self where
Self: 't,
'r: 't,
[src]
Self: 't,
'r: 't,
Marshals from a value (i.e. Mun -> Rust).
fn marshal_into(self) -> Self::MunType
[src]
Marshals itself into a Marshalled
value (i.e. Rust -> Mun).
fn marshal_from_ptr<'r>(
ptr: NonNull<Self::MunType>,
runtime: &'r Runtime,
type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
[src]
ptr: NonNull<Self::MunType>,
runtime: &'r Runtime,
type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
Marshals the value at memory location ptr
into a Marshalled
value (i.e. Mun -> Rust).
fn marshal_to_ptr(
value: Self,
ptr: NonNull<Self::MunType>,
type_info: Option<&TypeInfo>
)
[src]
value: Self,
ptr: NonNull<Self::MunType>,
type_info: Option<&TypeInfo>
)
Marshals value
to memory location ptr
(i.e. Rust -> Mun).
Implementations on Foreign Types
impl<'t> Marshal<'t> for i8
[src]
type MunType = i8
fn marshal_from<'r>(value: Self::MunType, _runtime: &'r Runtime) -> Self where
Self: 't,
'r: 't,
[src]
Self: 't,
'r: 't,
fn marshal_into<'r>(self) -> Self::MunType
[src]
fn marshal_from_ptr<'r>(
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
[src]
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
fn marshal_to_ptr(
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
[src]
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
impl<'t> Marshal<'t> for i16
[src]
type MunType = i16
fn marshal_from<'r>(value: Self::MunType, _runtime: &'r Runtime) -> Self where
Self: 't,
'r: 't,
[src]
Self: 't,
'r: 't,
fn marshal_into<'r>(self) -> Self::MunType
[src]
fn marshal_from_ptr<'r>(
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
[src]
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
fn marshal_to_ptr(
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
[src]
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
impl<'t> Marshal<'t> for i32
[src]
type MunType = i32
fn marshal_from<'r>(value: Self::MunType, _runtime: &'r Runtime) -> Self where
Self: 't,
'r: 't,
[src]
Self: 't,
'r: 't,
fn marshal_into<'r>(self) -> Self::MunType
[src]
fn marshal_from_ptr<'r>(
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
[src]
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
fn marshal_to_ptr(
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
[src]
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
impl<'t> Marshal<'t> for i64
[src]
type MunType = i64
fn marshal_from<'r>(value: Self::MunType, _runtime: &'r Runtime) -> Self where
Self: 't,
'r: 't,
[src]
Self: 't,
'r: 't,
fn marshal_into<'r>(self) -> Self::MunType
[src]
fn marshal_from_ptr<'r>(
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
[src]
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
fn marshal_to_ptr(
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
[src]
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
impl<'t> Marshal<'t> for i128
[src]
type MunType = i128
fn marshal_from<'r>(value: Self::MunType, _runtime: &'r Runtime) -> Self where
Self: 't,
'r: 't,
[src]
Self: 't,
'r: 't,
fn marshal_into<'r>(self) -> Self::MunType
[src]
fn marshal_from_ptr<'r>(
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
[src]
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
fn marshal_to_ptr(
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
[src]
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
impl<'t> Marshal<'t> for isize
[src]
type MunType = isize
fn marshal_from<'r>(value: Self::MunType, _runtime: &'r Runtime) -> Self where
Self: 't,
'r: 't,
[src]
Self: 't,
'r: 't,
fn marshal_into<'r>(self) -> Self::MunType
[src]
fn marshal_from_ptr<'r>(
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
[src]
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
fn marshal_to_ptr(
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
[src]
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
impl<'t> Marshal<'t> for u8
[src]
type MunType = u8
fn marshal_from<'r>(value: Self::MunType, _runtime: &'r Runtime) -> Self where
Self: 't,
'r: 't,
[src]
Self: 't,
'r: 't,
fn marshal_into<'r>(self) -> Self::MunType
[src]
fn marshal_from_ptr<'r>(
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
[src]
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
fn marshal_to_ptr(
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
[src]
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
impl<'t> Marshal<'t> for u16
[src]
type MunType = u16
fn marshal_from<'r>(value: Self::MunType, _runtime: &'r Runtime) -> Self where
Self: 't,
'r: 't,
[src]
Self: 't,
'r: 't,
fn marshal_into<'r>(self) -> Self::MunType
[src]
fn marshal_from_ptr<'r>(
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
[src]
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
fn marshal_to_ptr(
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
[src]
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
impl<'t> Marshal<'t> for u32
[src]
type MunType = u32
fn marshal_from<'r>(value: Self::MunType, _runtime: &'r Runtime) -> Self where
Self: 't,
'r: 't,
[src]
Self: 't,
'r: 't,
fn marshal_into<'r>(self) -> Self::MunType
[src]
fn marshal_from_ptr<'r>(
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
[src]
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
fn marshal_to_ptr(
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
[src]
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
impl<'t> Marshal<'t> for u64
[src]
type MunType = u64
fn marshal_from<'r>(value: Self::MunType, _runtime: &'r Runtime) -> Self where
Self: 't,
'r: 't,
[src]
Self: 't,
'r: 't,
fn marshal_into<'r>(self) -> Self::MunType
[src]
fn marshal_from_ptr<'r>(
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
[src]
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
fn marshal_to_ptr(
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
[src]
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
impl<'t> Marshal<'t> for u128
[src]
type MunType = u128
fn marshal_from<'r>(value: Self::MunType, _runtime: &'r Runtime) -> Self where
Self: 't,
'r: 't,
[src]
Self: 't,
'r: 't,
fn marshal_into<'r>(self) -> Self::MunType
[src]
fn marshal_from_ptr<'r>(
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
[src]
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
fn marshal_to_ptr(
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
[src]
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
impl<'t> Marshal<'t> for usize
[src]
type MunType = usize
fn marshal_from<'r>(value: Self::MunType, _runtime: &'r Runtime) -> Self where
Self: 't,
'r: 't,
[src]
Self: 't,
'r: 't,
fn marshal_into<'r>(self) -> Self::MunType
[src]
fn marshal_from_ptr<'r>(
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
[src]
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
fn marshal_to_ptr(
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
[src]
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
impl<'t> Marshal<'t> for f32
[src]
type MunType = f32
fn marshal_from<'r>(value: Self::MunType, _runtime: &'r Runtime) -> Self where
Self: 't,
'r: 't,
[src]
Self: 't,
'r: 't,
fn marshal_into<'r>(self) -> Self::MunType
[src]
fn marshal_from_ptr<'r>(
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
[src]
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
fn marshal_to_ptr(
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
[src]
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
impl<'t> Marshal<'t> for f64
[src]
type MunType = f64
fn marshal_from<'r>(value: Self::MunType, _runtime: &'r Runtime) -> Self where
Self: 't,
'r: 't,
[src]
Self: 't,
'r: 't,
fn marshal_into<'r>(self) -> Self::MunType
[src]
fn marshal_from_ptr<'r>(
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
[src]
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
fn marshal_to_ptr(
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
[src]
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
impl<'t> Marshal<'t> for bool
[src]
type MunType = bool
fn marshal_from<'r>(value: Self::MunType, _runtime: &'r Runtime) -> Self where
Self: 't,
'r: 't,
[src]
Self: 't,
'r: 't,
fn marshal_into<'r>(self) -> Self::MunType
[src]
fn marshal_from_ptr<'r>(
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
[src]
ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
fn marshal_to_ptr(
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
[src]
value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
impl<'t> Marshal<'t> for ()
[src]
type MunType = ()
fn marshal_from<'r>(value: Self::MunType, _runtime: &'r Runtime) -> Self where
Self: 't,
'r: 't,
[src]
Self: 't,
'r: 't,
fn marshal_into<'r>(self) -> Self::MunType
[src]
fn marshal_from_ptr<'r>(
_ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
[src]
_ptr: NonNull<Self::MunType>,
_runtime: &'r Runtime,
_type_info: Option<&TypeInfo>
) -> Self where
Self: 't,
'r: 't,
fn marshal_to_ptr(
_value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
[src]
_value: Self,
ptr: NonNull<Self::MunType>,
_type_info: Option<&TypeInfo>
)
Implementors
impl<'s> Marshal<'s> for StructRef<'s>
[src]
type MunType = RawStruct
fn marshal_from<'r>(value: Self::MunType, runtime: &'r Runtime) -> Self where
Self: 's,
'r: 's,
[src]
Self: 's,
'r: 's,
fn marshal_into<'r>(self) -> Self::MunType
[src]
fn marshal_from_ptr<'r>(
ptr: NonNull<Self::MunType>,
runtime: &'r Runtime,
type_info: Option<&TypeInfo>
) -> StructRef<'s> where
Self: 's,
'r: 's,
[src]
ptr: NonNull<Self::MunType>,
runtime: &'r Runtime,
type_info: Option<&TypeInfo>
) -> StructRef<'s> where
Self: 's,
'r: 's,
fn marshal_to_ptr(
value: Self,
ptr: NonNull<Self::MunType>,
type_info: Option<&TypeInfo>
)
[src]
value: Self,
ptr: NonNull<Self::MunType>,
type_info: Option<&TypeInfo>
)