#borrow #traits #sync

nightly no-std hv-guarded-borrow

Traits and implementations for generic use of "guarded" borrows

2 releases

0.1.1 Nov 12, 2021
0.1.0 Nov 12, 2021

#892 in Concurrency


Used in 3 crates (2 directly)

MIT/Apache

80KB
2K SLoC

Heavy Guarded-Borrow - traits for generalizing over guarded borrowing operations

This crate requires nightly and relies on the unstable feature generic_associated_types. It provides traits describing borrowing patterns (immutable borrows, mutable borrows from immutable references, and mutable borrows from mutable references) with accompanying associated Guard types parameterized by lifetime.

License

Licensed under either of

at your option.

Contribution

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


lib.rs:

Heavy Guarded-Borrow - traits for generalizing over guarded borrow operations

Using these traits allows you to write code which generalizes over the type of "guard" that a type like Mutex, RwLock, RefCell, AtomicRefCell, etc. may return.

Dependencies

~0–255KB