summaryrefslogtreecommitdiff
path: root/src/mutex/mutex.rs
diff options
context:
space:
mode:
authorMica White <botahamec@gmail.com>2024-12-26 12:06:47 -0500
committerMica White <botahamec@gmail.com>2024-12-26 13:23:40 -0500
commit9eec9ab94bbe5c9fbd52d5bbf393fe1ddcc6fc26 (patch)
treea55cb81db2167cd3caf3330d503c2e9cacd24fd4 /src/mutex/mutex.rs
parentdc16634f4abdb1e830d2749e64b419740702b302 (diff)
Documentation
Diffstat (limited to 'src/mutex/mutex.rs')
-rw-r--r--src/mutex/mutex.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mutex/mutex.rs b/src/mutex/mutex.rs
index 505ff83..9b71ea4 100644
--- a/src/mutex/mutex.rs
+++ b/src/mutex/mutex.rs
@@ -247,9 +247,14 @@ impl<T: ?Sized, R: RawMutex> Mutex<T, R> {
/// Attempts to lock the `Mutex` without blocking.
///
+ /// If the access could not be granted at this time, then `Err` is
+ /// returned. Otherwise, an RAII guard is returned which will release the
+ /// lock when it is dropped.
+ ///
/// # Errors
///
- /// Returns [`Err`] if the `Mutex` cannot be locked without blocking.
+ /// If the mutex could not be acquired because it is already locked, then
+ /// this call will return an error containing the given key.
///
/// # Examples
///