pub trait InteropRecive {
    type SourceType: Copy;

    // Required method
    fn get_rust_rep(mono_arg: Self::SourceType) -> Self;
}
Expand description

Trait specifying how to convert a type when transferring it between managed and unmanaged code. It specifies how to convert SourceType used by MonoRuntime to type implementing this trait.

Required Associated Types§

source

type SourceType: Copy

Souce type used by MonoRuntime when calling functions exposed by add_internal_call, or getting a value back from a method, that can be converted to a rust type.

Required Methods§

source

fn get_rust_rep(mono_arg: Self::SourceType) -> Self

Function converting Self::SourceType to type implementing InteropRecive trait.

Implementations on Foreign Types§

source§

impl InteropRecive for usize

§

type SourceType = usize

source§

fn get_rust_rep(mono_arg: Self::SourceType) -> Self

source§

impl InteropRecive for isize

§

type SourceType = isize

source§

fn get_rust_rep(mono_arg: Self::SourceType) -> Self

source§

impl<T> InteropRecive for *const T

§

type SourceType = *const T

source§

fn get_rust_rep(mono_arg: Self::SourceType) -> Self

source§

impl InteropRecive for String

§

type SourceType = *mut _MonoString

source§

fn get_rust_rep(mono_arg: Self::SourceType) -> Self

source§

impl<T> InteropRecive for *mut T

§

type SourceType = *mut T

source§

fn get_rust_rep(mono_arg: Self::SourceType) -> Self

source§

impl InteropRecive for u32

§

type SourceType = u32

source§

fn get_rust_rep(mono_arg: Self::SourceType) -> Self

source§

impl InteropRecive for i8

§

type SourceType = i8

source§

fn get_rust_rep(mono_arg: Self::SourceType) -> Self

source§

impl InteropRecive for i16

§

type SourceType = i16

source§

fn get_rust_rep(mono_arg: Self::SourceType) -> Self

source§

impl InteropRecive for f64

§

type SourceType = f64

source§

fn get_rust_rep(mono_arg: Self::SourceType) -> Self

source§

impl InteropRecive for f32

§

type SourceType = f32

source§

fn get_rust_rep(mono_arg: Self::SourceType) -> Self

source§

impl InteropRecive for i32

§

type SourceType = i32

source§

fn get_rust_rep(mono_arg: Self::SourceType) -> Self

source§

impl InteropRecive for u16

§

type SourceType = u16

source§

fn get_rust_rep(mono_arg: Self::SourceType) -> Self

source§

impl InteropRecive for u64

§

type SourceType = u64

source§

fn get_rust_rep(mono_arg: Self::SourceType) -> Self

source§

impl<T: ObjectTrait> InteropRecive for Option<T>

§

type SourceType = *mut _MonoObject

source§

fn get_rust_rep(src: Self::SourceType) -> Option<T>

source§

impl InteropRecive for i64

§

type SourceType = i64

source§

fn get_rust_rep(mono_arg: Self::SourceType) -> Self

source§

impl InteropRecive for u8

§

type SourceType = u8

source§

fn get_rust_rep(mono_arg: Self::SourceType) -> Self

source§

impl InteropRecive for char

§

type SourceType = u16

source§

fn get_rust_rep(mono_arg: Self::SourceType) -> Self

source§

impl InteropRecive for bool

§

type SourceType = bool

source§

fn get_rust_rep(mono_arg: Self::SourceType) -> Self

Implementors§

source§

impl<T: ObjectTrait> InteropRecive for T

§

type SourceType = *mut _MonoObject