pub unsafe trait Mutex:
'static
+ Sync
+ Send {
type Guard<'a>;
// Required methods
unsafe fn new(ptr: *mut Self);
unsafe fn lock(&self) -> Self::Guard<'_>;
}
Expand description
§Safety
The implementation must make sure the functions in the trait behave properly.
Required Associated Types§
Required Methods§
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.