upcast 0.1.0

Simple trait for helping along upcasting of dyn supertraits. ``` pub trait A {} pub trait B: A + Upcast<dyn A> {} // Put this in your library impl<'a, T: A + 'a> UpcastFrom<T> for dyn A + 'a { fn up_from(value: &T) -> &(dyn A + 'a) { value } fn up_from_mut(value: &mut T) -> &mut (dyn A + 'a) { value } } // Now your users can do an upcast if needed, or you can within implementations fn do_cast(b: &dyn B) -> &dyn A { b.up() } ```
Documentation
  • Feature flags
  • Feature flags are not available for this release because it was built before features were collected by docs.rs.

upcast

There is very little structured metadata to build this page from currently. You should check the main library docs, readme, or Cargo.toml in case the author documented the features in them.

Feature flags are not available for this release because it was built before features were collected by docs.rs.