#borrow #cow #convert #macro-derive #into-static #to-borrowed

no-std lifetime

Traits and derive macros to change the lifetime of a type, allowing efficient reuse of your stucts or enums with any lifetime requirement

3 releases

0.1.0 Aug 21, 2021
0.1.0-beta1 Aug 7, 2021

#2425 in Rust patterns

Download history 36/week @ 2023-12-18 30/week @ 2023-12-25 66/week @ 2024-01-08 67/week @ 2024-01-15 2/week @ 2024-01-22 23/week @ 2024-01-29 33/week @ 2024-02-05 52/week @ 2024-02-12 102/week @ 2024-02-19 127/week @ 2024-02-26 118/week @ 2024-03-04 82/week @ 2024-03-11 84/week @ 2024-03-18 43/week @ 2024-03-25 109/week @ 2024-04-01

323 downloads per month
Used in 2 crates

MIT/Apache

11KB
258 lines

lifetime

This crate provides traits and derive macros to change the lifetime of a type, allowing efficient reuse of your stucts or enums with any lifetime requirement.

Have a look at the documentation for more information.

Install

[dependencies]
lifetime = { version = "x.y", features = ["macros"] }

Safety

This crate uses #![forbid(unsafe_code)]. We want to keep this crate 100% safe and its dependencies to a minimum. Currently this crate has no dependencies.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


lib.rs:

This crate provides traits and derive macros to change the lifetime of a type, allowing efficient reuse of your stucts or enums with any lifetime requirement.

macros feature

This crate's macros are not enabled by default. Use the following in your Cargo.toml, replacing x.y with the version you want, to enable macros.

[dependencies]
lifetime = { version = "x.y", features = ["macros"] }

no_std

Use the following in your Cargo.toml, replacing x.y with the version you want, to disable the default std and alloc features.

[dependencies]
lifetime = { version = "x.y", default-features = false }

Dependencies

~210KB