pub trait MutexAssertions {
// Required methods
fn is_locked(self) -> Self;
fn is_not_locked(self) -> Self;
// Provided method
fn is_free(self) -> Self
where Self: Sized { ... }
}Required Methods§
Sourcefn is_locked(self) -> Self
fn is_locked(self) -> Self
Asserts that this mutex is locked. Note that implementations may try to acquire the lock in order to check its state.
Sourcefn is_not_locked(self) -> Self
fn is_not_locked(self) -> Self
Asserts that this mutex is not locked. Note that implementations may try to acquire the lock in order to check its state.
Provided Methods§
Sourcefn is_free(self) -> Selfwhere
Self: Sized,
fn is_free(self) -> Selfwhere
Self: Sized,
Asserts that this mutex is not locked. Note that implementations may try to acquire the lock in order to check its state.
Synonym for Self::is_not_locked.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.