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

pub trait IsType<T>: Into<T> + From<T> {
    pub fn from_ref(t: &T) -> &Self;
pub fn into_ref(&self) -> &T;
pub fn from_mut(t: &mut T) -> &mut Self;
pub 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

pub fn from_ref(t: &T) -> &Self

Cast reference.

pub fn into_ref(&self) -> &T

Cast reference.

pub fn from_mut(t: &mut T) -> &mut Self

Cast mutable reference.

pub fn into_mut(&mut self) -> &mut T

Cast mutable reference.

Loading content...

Implementors

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

Loading content...