Trait red4ext_rs::FromRepr

source ·
pub trait FromRepr: Sized {
    type Repr: NativeRepr;

    // Required method
    fn from_repr(repr: Self::Repr) -> Self;
}
Expand description

A trait for types that can be created from a representation passed across the FFI boundary.

Required Associated Types§

Required Methods§

source

fn from_repr(repr: Self::Repr) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl FromRepr for String

§

type Repr = RedString

source§

fn from_repr(repr: Self::Repr) -> Self

source§

impl<A> FromRepr for Vec<A>
where A: FromRepr,

§

type Repr = RedArray<<A as FromRepr>::Repr>

source§

fn from_repr(repr: Self::Repr) -> Self

Implementors§

source§

impl<A: NativeRepr + Default + PartialEq> FromRepr for Opt<A>

§

type Repr = A

source§

impl<A: NativeRepr> FromRepr for A

§

type Repr = A