Trait as_any::AsAny

source ·
pub trait AsAny: Any {
    // Required methods
    fn as_any(&self) -> &dyn Any;
    fn as_any_mut(&mut self) -> &mut dyn Any;
    fn type_name(&self) -> &'static str;
}
Expand description

This trait is an extension trait to Any, and adds methods to retrieve a &dyn Any

Required Methods§

source

fn as_any(&self) -> &dyn Any

source

fn as_any_mut(&mut self) -> &mut dyn Any

source

fn type_name(&self) -> &'static str

Gets the type name of self

Implementors§

source§

impl<T: Any> AsAny for T