pub struct Mutex { /* private fields */ }
Mutex implementation
Create a new mutex
Try to acquire the mutex
Acquire the mutex, blocking if necessary
Release the mutex.
Returns Err if the calling thread does not own the lock. Callers should handle this as a programming error rather than letting the kernel panic inside a critical section.
Err
Check if mutex is locked
TypeId
self
Returns the argument unchanged.
Calls U::from(self).
U::from(self)
That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.
[From]<T> for U