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

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

#2577 in Rust patterns

Download history 89/week @ 2024-07-25 100/week @ 2024-08-01 93/week @ 2024-08-08 93/week @ 2024-08-15 96/week @ 2024-08-22 86/week @ 2024-08-29 22/week @ 2024-09-05 50/week @ 2024-09-12 65/week @ 2024-09-19 69/week @ 2024-09-26 44/week @ 2024-10-03 47/week @ 2024-10-10 79/week @ 2024-10-17 44/week @ 2024-10-24 82/week @ 2024-10-31 33/week @ 2024-11-07

242 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

~230KB