Trait frame_support::traits::IsType[][src]

pub trait IsType<T>: Into<T> + From<T> {
    fn from_ref(t: &T) -> &Self;
fn into_ref(&self) -> &T;
fn from_mut(t: &mut T) -> &mut Self;
fn into_mut(&mut self) -> &mut T; }

Trait to be used when types are exactly same.

This allow to convert back and forth from type, a reference and a mutable reference.

Required methods

fn from_ref(t: &T) -> &Self[src]

Cast reference.

fn into_ref(&self) -> &T[src]

Cast reference.

fn from_mut(t: &mut T) -> &mut Self[src]

Cast mutable reference.

fn into_mut(&mut self) -> &mut T[src]

Cast mutable reference.

Loading content...

Implementors

impl<T> IsType<T> for T[src]

Loading content...