Trait std::any::AnyRefExt
pub trait AnyRefExt<'a> { fn is<T: 'static>(self) -> bool; fn as_ref<T: 'static>(self) -> Option<&'a T>; }
Extension methods for a referenced Any
trait object
Required Methods
fn is<T: 'static>(self) -> bool
Returns true if the boxed type is the same as T
fn as_ref<T: 'static>(self) -> Option<&'a T>
Returns some reference to the boxed value if it is of type T
, or
None
if it isn't.