Is this type of polymorphism possible in Rust, or is it planned?
I.e.
trait R { ... }
struct S { ... }
impl R for S { ... }
let r: Box<R> = Box::new(S { ... });
let s: Box<S> = dynamic_cast<Box<S>>(r).expect("r is a boxed S");
I am aware that std::mem::transmute
provides an unsafe way of doing this, but don't see any explicit support for dynamic_cast (which, I guess, is fine).