pub trait Upcast<U: ?Sized> {
// Required methods
fn up(&self) -> &U;
fn up_mut(&mut self) -> &mut U;
fn up_box(self: Box<Self>) -> Box<U>;
}
Expand description
Use this trait to perform your upcasts on dyn traits. Make sure to require it in the supertrait!