Expand description
cast module contains traits to provide cast method for various references
and smart pointers.
In source files requiring casts, import all of the traits as follows:
ⓘ
use intertrait::cast::*;Since there exists single trait for each receiver type, the same cast method is overloaded.
Traits§
- CastArc
- A trait that is blanket-implemented for traits extending
CastFromto allow for casting of a trait object for it behind anRcto a trait object for another trait implemented by the underlying value. - CastBox
- A trait that is blanket-implemented for traits extending
CastFromto allow for casting of a trait object for it behind aBoxto a trait object for another trait implemented by the underlying value. - CastMut
- A trait that is blanket-implemented for traits extending
CastFromto allow for casting of a trait object for it behind an mutable reference to a trait object for another trait implemented by the underlying value. - CastRc
- A trait that is blanket-implemented for traits extending
CastFromto allow for casting of a trait object for it behind anRcto a trait object for another trait implemented by the underlying value. - CastRef
- A trait that is blanket-implemented for traits extending
CastFromto allow for casting of a trait object for it behind an immutable reference to a trait object for another trait implemented by the underlying value.