Closed kenz-gelsoft closed 2 years ago
upcasting may be expressed with AsRef< Base>
downcast could be expressed as:
impl TryFrom<AsRef<Base>> for &Derived
or so?
upcasting may be expressed with AsRef< Base>
AsRef<Base>
successfully (at least, for me, yet...).Try to represent base/derived classes with From/TryFrom traits.
Use these scenarios as testbed: