pub fn try_lock(&self) -> Option<MutexGuard<'_, T>> {
        if let Some(guard) = self.0.try_lock() {
            Some(MutexGuard(guard))
        } else {
            None
        }
    }
/// Attempts to acquire the mutex.
///
/// If the mutex could not be acquired at this time, then [`None`] is returned. Otherwise, a
/// guard is returned that releases the mutex when dropped.
///
/// [`None`]: https://doc.rust-lang.org/std/option/enum.Option.html#variant.None
///
/// # Examples
///
/// ```
/// use async_dup::Mutex;
///
/// let mutex = Mutex::new(10);
/// if let Some(guard) = mutex.try_lock() {
///     assert_eq!(*guard, 10);
/// }
/// # ;
/// ```
Attempts to acquire the mutex.
If the mutex could not be acquired at this time, then [`None`] is returned. Otherwise, a
guard is returned that releases the mutex when dropped.


Attempts to acquire the mutex . If the mutex could not be acquired at this time then [ ` None ` ] is returned . Otherwise a guard is returned that releases the mutex when dropped .
pub fn try_lock(&self) -> Option<MutexGuard<'_, T>> {
        if let Some(guard) = self.0.try_lock() {
            Some(MutexGuard(guard))
        } else {
            None
        }
    }
pub fn try_lock ( & self ) -> Option < MutexGuard < ' _ , T > > { if let Some ( guard ) = self . 0 . try_lock ( ) { Some ( MutexGuard ( guard ) ) } else { None } }
Attempts to acquire the mutex.
Attempts to acquire the mutex .
&self
&self
examples
```
use async_dup::Mutex.

let mutex = Mutex::new(10);
if let Some(guard) = mutex.try_lock() {
assert_eq!(*guard, 10);
}
` ` ` use async_dup :: Mutex . let mutex = Mutex :: new ( 10 ) ; if let Some ( guard ) = mutex . try_lock () { assert_eq! ( * guard 10 ) ; }
;
None