Supply
Provider API for arbitrary number of lifetimes.
supply implements an API similar to that proposed in
RFC 3192. It allows
accessing data based on type tags. Expanding on RFC 3192, supply
allows accessing data with an arbitrary number of lifetimes. Additionally,
supply allows for multiple values to be requested at once.
use ;
// Implementing Provider allows requesting data from a Person value.
// Make an example person to request data from.
let name = Stringfrom;
let provided_name;
;
// Because the name was tagged as &'a str we can still access it here.
assert_eq!;
no_std Support
This crate is #![no_std] by default, it can be used anywhere Rust can.
Minimum Supported Rust Version
Requires Rust 1.79.0.
This crate follows the "Latest stable Rust" policy. The listed MSRV won't be changed unless needed. However, updating the MSRV anywhere up to the latest stable at time of release is allowed.
Contributing
Contributions in any form (issues, pull requests, etc.) to this project must adhere to Rust's Code of Conduct.
Unless you explicitly state otherwise, any contribution intentionally submitted for
inclusion in supply by you shall be licensed as below, without any
additional terms or conditions.
License
This project is licensed under either of
at your option.