cast.rs 515 B

123456789101112131415161718192021
  1. //! `cast` module contains traits to provide `cast` method for various references
  2. //! and smart pointers.
  3. //!
  4. //! In source files requiring casts, import all of the traits as follows:
  5. //!
  6. //! ```ignore
  7. //! use intertrait::cast::*;
  8. //! ```
  9. //!
  10. //! Since there exists single trait for each receiver type, the same `cast` method is overloaded.
  11. mod cast_arc;
  12. mod cast_box;
  13. mod cast_mut;
  14. mod cast_rc;
  15. mod cast_ref;
  16. pub use cast_arc::*;
  17. pub use cast_box::*;
  18. pub use cast_mut::*;
  19. pub use cast_rc::*;
  20. pub use cast_ref::*;