[][src]Trait downcast::Downcast

pub trait Downcast<T>: Any where
    T: Any
{ fn is_type(&self) -> bool { ... }
unsafe fn downcast_ref_unchecked(&self) -> &T { ... }
fn downcast_ref(&self) -> Result<&T, TypeMismatch> { ... }
unsafe fn downcast_mut_unchecked(&mut self) -> &mut T { ... }
fn downcast_mut(&mut self) -> Result<&mut T, TypeMismatch> { ... }
unsafe fn downcast_unchecked(self: Box<Self>) -> Box<T> { ... }
fn downcast(self: Box<Self>) -> Result<Box<T>, DowncastError<Box<Self>>> { ... } }

Provided methods

fn is_type(&self) -> bool

Important traits for &'a mut W
unsafe fn downcast_ref_unchecked(&self) -> &T

fn downcast_ref(&self) -> Result<&T, TypeMismatch>

Important traits for &'a mut W
unsafe fn downcast_mut_unchecked(&mut self) -> &mut T

fn downcast_mut(&mut self) -> Result<&mut T, TypeMismatch>

Important traits for Box<W>
unsafe fn downcast_unchecked(self: Box<Self>) -> Box<T>

fn downcast(self: Box<Self>) -> Result<Box<T>, DowncastError<Box<Self>>>

Loading content...

Implementors

impl<_T: Any> Downcast<_T> for dyn Any + Send + Sync where
    _T: Any
[src]

fn is_type(&self) -> bool[src]

Important traits for &'a mut W
unsafe fn downcast_ref_unchecked(&self) -> &T[src]

fn downcast_ref(&self) -> Result<&T, TypeMismatch>[src]

Important traits for &'a mut W
unsafe fn downcast_mut_unchecked(&mut self) -> &mut T[src]

fn downcast_mut(&mut self) -> Result<&mut T, TypeMismatch>[src]

Important traits for Box<W>
unsafe fn downcast_unchecked(self: Box<Self>) -> Box<T>[src]

fn downcast(self: Box<Self>) -> Result<Box<T>, DowncastError<Box<Self>>>[src]

impl<_T: Any> Downcast<_T> for dyn Any + Send where
    _T: Any
[src]

fn is_type(&self) -> bool[src]

Important traits for &'a mut W
unsafe fn downcast_ref_unchecked(&self) -> &T[src]

fn downcast_ref(&self) -> Result<&T, TypeMismatch>[src]

Important traits for &'a mut W
unsafe fn downcast_mut_unchecked(&mut self) -> &mut T[src]

fn downcast_mut(&mut self) -> Result<&mut T, TypeMismatch>[src]

Important traits for Box<W>
unsafe fn downcast_unchecked(self: Box<Self>) -> Box<T>[src]

fn downcast(self: Box<Self>) -> Result<Box<T>, DowncastError<Box<Self>>>[src]

impl<_T: Any> Downcast<_T> for dyn Any + Sync where
    _T: Any
[src]

fn is_type(&self) -> bool[src]

Important traits for &'a mut W
unsafe fn downcast_ref_unchecked(&self) -> &T[src]

fn downcast_ref(&self) -> Result<&T, TypeMismatch>[src]

Important traits for &'a mut W
unsafe fn downcast_mut_unchecked(&mut self) -> &mut T[src]

fn downcast_mut(&mut self) -> Result<&mut T, TypeMismatch>[src]

Important traits for Box<W>
unsafe fn downcast_unchecked(self: Box<Self>) -> Box<T>[src]

fn downcast(self: Box<Self>) -> Result<Box<T>, DowncastError<Box<Self>>>[src]

impl<_T: Any> Downcast<_T> for dyn Any where
    _T: Any
[src]

fn is_type(&self) -> bool[src]

Important traits for &'a mut W
unsafe fn downcast_ref_unchecked(&self) -> &T[src]

fn downcast_ref(&self) -> Result<&T, TypeMismatch>[src]

Important traits for &'a mut W
unsafe fn downcast_mut_unchecked(&mut self) -> &mut T[src]

fn downcast_mut(&mut self) -> Result<&mut T, TypeMismatch>[src]

Important traits for Box<W>
unsafe fn downcast_unchecked(self: Box<Self>) -> Box<T>[src]

fn downcast(self: Box<Self>) -> Result<Box<T>, DowncastError<Box<Self>>>[src]

Loading content...