Any is a trait that most data types in Rust implement automatically, which means we can store almost anything in a trait object of Any type. However, as we've mentioned before, we can only access the stored value in a trait object in terms of that trait's interface, so what does the Any interface let us do?
Any
Any can store almost anything
The Rust compiler automatically implements Any for any data type, unless that data type contains non-static references. So, our Forward, Turn, and Stop structures that we used in the trait objects section already automatically implement Any, but something like this would not:
pub struct DoesNotHaveAnyTrait<'a> {
pub name: &'a str,
pub count: i32,
}
More...