Module cast

Module cast 

Source
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 CastFrom to allow for casting of a trait object for it behind an Rc to a trait object for another trait implemented by the underlying value.
CastBox
A trait that is blanket-implemented for traits extending CastFrom to allow for casting of a trait object for it behind a Box to a trait object for another trait implemented by the underlying value.
CastMut
A trait that is blanket-implemented for traits extending CastFrom to 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 CastFrom to allow for casting of a trait object for it behind an Rc to a trait object for another trait implemented by the underlying value.
CastRef
A trait that is blanket-implemented for traits extending CastFrom to 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.