pub trait Downcast: Sized {
    // Required method
    fn downcast<T>(&self) -> Option<T>
       where T: DowncastFrom<Self>;

    // Provided method
    fn is_a<T>(&self) -> bool
       where T: DowncastFrom<Self> { ... }
}
Expand description

This is the convenience trait whose method you should call to do a downcast.

Required Methods§

source

fn downcast<T>(&self) -> Option<T>
where T: DowncastFrom<Self>,

Provided Methods§

source

fn is_a<T>(&self) -> bool
where T: DowncastFrom<Self>,

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<U> Downcast for U