pub trait SafeLock {
type Output<'a>
where Self: 'a;
const TIMEOUT: Duration = _;
// Required method
fn safe_lock(&self) -> Self::Output<'_>;
}Expand description
Trait for lockable objects that can panic if they take too long to lock. Panicking is preferable over freezing.
Provided Associated Constants§
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.