diff options
| author | Botahamec <botahamec@outlook.com> | 2024-05-22 17:27:35 -0400 |
|---|---|---|
| committer | Botahamec <botahamec@outlook.com> | 2024-05-22 17:27:35 -0400 |
| commit | ef191a3e8ecf4093fcd08036e35012c1af173a08 (patch) | |
| tree | 9a6986986ad8392ae147c64c436214fa290773d7 /src/lib.rs | |
| parent | ebbe3cfce28914d776f3e5f89894fab50911c57e (diff) | |
Documentation for types
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -107,19 +107,24 @@ //! ``` mod key; -mod lockable; pub mod collection; +pub mod lockable; pub mod mutex; pub mod rwlock; -pub use collection::BoxedLockCollection as LockCollection; pub use key::{Keyable, ThreadKey}; -pub use lockable::{Lockable, OwnedLockable, Sharable}; #[cfg(feature = "spin")] pub use mutex::SpinLock; +/// A collection of locks that can be acquired simultaneously. +/// +/// This re-exports [`BoxedLockCollection`] as a sensible default. +/// +/// [`BoxedLockCollection`]: collection::BoxedLockCollection +pub type LockCollection<L> = collection::BoxedLockCollection<L>; + /// A mutual exclusion primitive useful for protecting shared data, which cannot deadlock. /// /// By default, this uses `parking_lot` as a backend. |
