[][src]Trait as_any::Downcast

pub trait Downcast: AsAny {
    fn is<T>(&self) -> bool
    where
        T: AsAny
, { ... }
fn downcast_ref<T>(&self) -> Option<&T>
    where
        T: AsAny
, { ... }
fn downcast_mut<T>(&mut self) -> Option<&mut T>
    where
        T: AsAny
, { ... }
unsafe fn downcast_ref_unchecked<T: Any>(&self) -> &T { ... }
unsafe fn downcast_mut_unchecked<T: Any>(&mut self) -> &mut T { ... } }

Provided methods

fn is<T>(&self) -> bool where
    T: AsAny

Returns true if the boxed type is the same as T.

Forward to the method defined on the type Any.

fn downcast_ref<T>(&self) -> Option<&T> where
    T: AsAny

Forward to the method defined on the type Any.

fn downcast_mut<T>(&mut self) -> Option<&mut T> where
    T: AsAny

Forward to the method defined on the type Any.

unsafe fn downcast_ref_unchecked<T: Any>(&self) -> &T

unsafe fn downcast_mut_unchecked<T: Any>(&mut self) -> &mut T

Loading content...

Implementors

impl Downcast for dyn AsAny[src]

impl Downcast for dyn AsAny + Send[src]

impl Downcast for dyn AsAny + Send + Sync[src]

impl Downcast for dyn AsAny + Sync[src]

Loading content...