red4ext_rs

Trait 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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl FromRepr for String

Source§

type Repr = RedString

Source§

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

Source§

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

Source§

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

Source§

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

Implementors§