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§

impl FromRef for char

Source§

impl FromRef for f32

Source§

type Ref = f32

Source§

fn from_ref(ref_: &<f32 as FromRef>::Ref) -> f32

Source§

impl FromRef for f64

Source§

type Ref = f64

Source§

fn from_ref(ref_: &<f64 as FromRef>::Ref) -> f64

Source§

impl FromRef for i8

Source§

type Ref = i8

Source§

fn from_ref(ref_: &<i8 as FromRef>::Ref) -> i8

Source§

impl FromRef for i16

Source§

type Ref = i16

Source§

fn from_ref(ref_: &<i16 as FromRef>::Ref) -> i16

Source§

impl FromRef for i32

Source§

type Ref = i32

Source§

fn from_ref(ref_: &<i32 as FromRef>::Ref) -> i32

Source§

impl FromRef for i64

Source§

type Ref = i64

Source§

fn from_ref(ref_: &<i64 as FromRef>::Ref) -> i64

Source§

impl FromRef for isize

Source§

impl FromRef for u8

Source§

type Ref = u8

Source§

fn from_ref(ref_: &<u8 as FromRef>::Ref) -> u8

Source§

impl FromRef for u16

Source§

type Ref = u16

Source§

fn from_ref(ref_: &<u16 as FromRef>::Ref) -> u16

Source§

impl FromRef for u32

Source§

type Ref = u32

Source§

fn from_ref(ref_: &<u32 as FromRef>::Ref) -> u32

Source§

impl FromRef for u64

Source§

type Ref = u64

Source§

fn from_ref(ref_: &<u64 as FromRef>::Ref) -> u64

Source§

impl FromRef for usize

Source§

impl FromRef for String

Source§

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

Source§

type Ref = ListRef

Source§

fn from_ref(ref_: &<Vec<T> as FromRef>::Ref) -> Vec<T>

Implementors§