FromRef

Trait FromRef 

Source
pub trait FromRef {
    type Ref;

    // Required method
    fn from_ref(ref_: &Self::Ref) -> Self;
}

Required Associated Types§

Required Methods§

Source

fn from_ref(ref_: &Self::Ref) -> 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 FromRef for bool

Source§

type Ref = bool

Source§

fn from_ref(ref_: &Self::Ref) -> Self

Source§

impl FromRef for char

Source§

type Ref = char

Source§

fn from_ref(ref_: &Self::Ref) -> Self

Source§

impl FromRef for f32

Source§

type Ref = f32

Source§

fn from_ref(ref_: &Self::Ref) -> Self

Source§

impl FromRef for f64

Source§

type Ref = f64

Source§

fn from_ref(ref_: &Self::Ref) -> Self

Source§

impl FromRef for i8

Source§

type Ref = i8

Source§

fn from_ref(ref_: &Self::Ref) -> Self

Source§

impl FromRef for i16

Source§

type Ref = i16

Source§

fn from_ref(ref_: &Self::Ref) -> Self

Source§

impl FromRef for i32

Source§

type Ref = i32

Source§

fn from_ref(ref_: &Self::Ref) -> Self

Source§

impl FromRef for i64

Source§

type Ref = i64

Source§

fn from_ref(ref_: &Self::Ref) -> Self

Source§

impl FromRef for isize

Source§

type Ref = isize

Source§

fn from_ref(ref_: &Self::Ref) -> Self

Source§

impl FromRef for u8

Source§

type Ref = u8

Source§

fn from_ref(ref_: &Self::Ref) -> Self

Source§

impl FromRef for u16

Source§

type Ref = u16

Source§

fn from_ref(ref_: &Self::Ref) -> Self

Source§

impl FromRef for u32

Source§

type Ref = u32

Source§

fn from_ref(ref_: &Self::Ref) -> Self

Source§

impl FromRef for u64

Source§

type Ref = u64

Source§

fn from_ref(ref_: &Self::Ref) -> Self

Source§

impl FromRef for usize

Source§

type Ref = usize

Source§

fn from_ref(ref_: &Self::Ref) -> Self

Source§

impl FromRef for String

Source§

type Ref = StringRef

Source§

fn from_ref(ref_: &Self::Ref) -> Self

Source§

impl<T: FromRef> FromRef for Vec<T>

Source§

type Ref = ListRef

Source§

fn from_ref(ref_: &Self::Ref) -> Self

Implementors§