pub trait AnyComponent: ErasedComponent {
// Required methods
fn as_any(&self) -> &(dyn Any + 'static);
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static);
}Expand description
Dyn-safe downcast surface. No blanket impl — Box<dyn AnyComponent>
would otherwise shadow per-type vtables. bb::Concrete derive
emits the impl.
Required Methods§
Sourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Downcast view - mutable.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".