From 9eec9ab94bbe5c9fbd52d5bbf393fe1ddcc6fc26 Mon Sep 17 00:00:00 2001 From: Mica White Date: Thu, 26 Dec 2024 12:06:47 -0500 Subject: Documentation --- src/mutex/mutex.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/mutex/mutex.rs') 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 Mutex { /// 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 /// -- cgit v1.2.3