JRRudy1 / transient

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

`Transient` implementations for foreign types #6

Open JRRudy1 opened 1 week ago

JRRudy1 commented 1 week ago

Using this crate requires types to implement the Transient trait, which must either be done in the transient crate or in the type's crate due to the orphan rule. This is obviously a problem for crates that want to use the Transient functionality for foreign types (though the new-type pattern can be used to get around this in many cases). This crate attempts to provide Transient implementations for many common standard library types, as well as those in a few third party crates, but this collection is far from exhaustive.

This Issue intends to track requests for new implementations and the progress in adding them. Feel free to comment here listing any desired implementations, and new Issue's or PR's are also welcome.

Note that this crate should stay light-weight with no hard dependencies, so implementations for any non-stdlib types will need to be feature-gated.