type erasure
Hiding a value's real type behind a trait.
Type erasure stores a value as a trait object (Box
Examples
let e: Box<dyn Error> = "x".parse::<u32>().unwrap_err().into();no longer shows it is aParseIntError, bute.downcast_ref::<ParseIntError>()returnsSome.
See also