summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorBotahamec <botahamec@outlook.com>2024-05-22 17:27:35 -0400
committerBotahamec <botahamec@outlook.com>2024-05-22 17:27:35 -0400
commitef191a3e8ecf4093fcd08036e35012c1af173a08 (patch)
tree9a6986986ad8392ae147c64c436214fa290773d7 /src/lib.rs
parentebbe3cfce28914d776f3e5f89894fab50911c57e (diff)
Documentation for types
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 668f3db..673d279 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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.