JRRudy1 / transient

Rust crate providing a reimplementation of the `std::any::Any` trait that supports types with non-`'static` lifetimes.
Other
35 stars 1 forks source link

Update `Transient` docs to discuss variance with respect to generic type parameters. #9

Open JRRudy1 opened 3 months ago

JRRudy1 commented 3 months ago

The examples and discussion in the Transient doc string related to implementing the trait for types with generic type parameters suggests using T::Transience in the implementing types Transience, but neglects consideration for types that are contravariant or invariant with respect to the type parameter (as discussed in Issue #5). Now that PR #8 has introduced a mechanism for declaring variances for type parameters, the Transient docstring should be updated to discuss and provide examples of this.

It will be a few days before I can get around to this, so I am opening this issue as a reminder.