
Generics
Any and Downcasting in Rust Trait Objects Explained
std::any::Any lets you ask a trait object what concrete type it holds. Learn downcast_ref, Box<dyn Any>, the as_any pattern for your own traits, and when an enum is the better design.
8 min read