pub trait AnyView {
// Required methods
fn as_any(&self) -> &(dyn Any + 'static);
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static);
fn as_boxed_any(self: Box<Self>) -> Box<dyn Any>;
}Expand description
A view that can be downcasted to its concrete type.
This trait is automatically implemented for any T: View.
Required Methods§
Sourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Downcast self to a mutable Any.
Implementations§
Source§impl dyn AnyView
impl dyn AnyView
Sourcepub fn downcast_ref<T>(&self) -> Option<&T>where
T: Any,
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: Any,
Attempts to downcast self to a concrete type.
Sourcepub fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: Any,
pub fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: Any,
Attempts to downcast self to a concrete type.