Basic operations for a mutex.
Types implementing this trait can be used by
Mutex to form a safe and
fully-functioning mutex type.
Implementations of this trait must ensure that the mutex is actually exclusive: a lock can't be acquired while the mutex is already locked.
Marker type which determines whether a lock guard should be
one of the
GuardNoSend helper types here.
const INIT: Self
Initial value for an unlocked mutex.
Acquires this mutex, blocking the current thread until it is able to do so.
fn try_lock(&self) -> bool
Attempts to acquire this mutex without blocking.
Unlocks this mutex.