Skip to main content

Lock

Trait Lock 

Source
pub trait Lock<'a> {
    type Output;

    // Required methods
    unsafe fn lock_info(&self) -> LockInfo<'_>;
    unsafe fn lock_unchecked(self) -> Self::Output;
}

Required Associated Types§

Required Methods§

Source

unsafe fn lock_info(&self) -> LockInfo<'_>

Source

unsafe fn lock_unchecked(self) -> Self::Output

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'a, T> Lock<'a> for Mut<T>
where T: WriteLock<'a>,

Source§

type Output = <T as WriteLock<'a>>::Output

Source§

impl<'a, T> Lock<'a> for Ref<T>
where T: ReadLock<'a>,

Source§

type Output = <T as ReadLock<'a>>::Output