pub(crate) fn try_lock(&self) -> Option<MutexGuard<'_, T>> {
        if self.lock.compare_and_swap(false, true, Ordering::Acquire) == false {
            Some(MutexGuard {
                lock: &self.lock,
                data: unsafe { &mut *self.data.get() },
            })
        } else {
            None
        }
    }
/// Tries to lock the mutex. If it is already locked, it will return None. Otherwise it returns
/// a guard within Some.
Tries to lock the mutex. If it is already locked, it will return None. Otherwise it returns
a guard within Some.
Tries to lock the mutex . If it is already locked it will return None . Otherwise it returns a guard within Some .
pub(crate) fn try_lock(&self) -> Option<MutexGuard<'_, T>> {
        if self.lock.compare_and_swap(false, true, Ordering::Acquire) == false {
            Some(MutexGuard {
                lock: &self.lock,
                data: unsafe { &mut *self.data.get() },
            })
        } else {
            None
        }
    }
pub ( crate ) fn try_lock ( & self ) -> Option < MutexGuard < ' _ , T > > { if self . lock . compare_and_swap ( false , true , Ordering :: Acquire ) == false { Some ( MutexGuard { lock : & self . lock , data : unsafe { & mut * self . data . get ( ) } , } ) } else { None } }
Tries to lock the mutex.
Tries to lock the mutex .
&self
&self