pub struct Lock<T: ?Sized, B: Backend> { /* private fields */ }
Expand description
A mutual exclusion primitive.
Exposes one of the kernel locking primitives. Which one is exposed depends on the lock
Backend
specified as the generic parameter B
.
Implementations§
Source§impl<T, B: Backend> Lock<T, B>
impl<T, B: Backend> Lock<T, B>
Sourcepub fn new(
t: T,
name: &'static CStr,
key: &'static LockClassKey,
) -> impl PinInit<Self>
pub fn new( t: T, name: &'static CStr, key: &'static LockClassKey, ) -> impl PinInit<Self>
Constructs a new lock initialiser.
Trait Implementations§
impl<T: ?Sized + Send, B: Backend> Send for Lock<T, B>
impl<T: ?Sized + Send, B: Backend> Sync for Lock<T, B>
Auto Trait Implementations§
impl<T, B> !Freeze for Lock<T, B>
impl<T, B> !RefUnwindSafe for Lock<T, B>
impl<T, B> UnwindSafe for Lock<T, B>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more