Struct maitake_sync::mutex::Lock  
source · pub struct Lock<'a, T: ?Sized, L: ScopedRawMutex = DefaultMutex> { /* private fields */ }Expand description
A future returned by the Mutex::lock method.
§Notes
This future is !Unpin, as it is unsafe to core::mem::forget a
Lock future once it has been polled. For instance, the following code
must not compile:
ⓘ
 use maitake_sync::mutex::Lock;
 // Calls to this function should only compile if `T` is `Unpin`.
 fn assert_unpin<T: Unpin>() {}
 assert_unpin::<Lock<'_, ()>>();Trait Implementations§
impl<'pin, 'a, T: ?Sized, L: ScopedRawMutex> Unpin for Lock<'a, T, L>where
    __Lock<'pin, 'a, T, L>: Unpin,
Auto Trait Implementations§
impl<'a, T, L = DefaultMutex> !Freeze for Lock<'a, T, L>
impl<'a, T, L = DefaultMutex> !RefUnwindSafe for Lock<'a, T, L>
impl<'a, T, L> Send for Lock<'a, T, L>
impl<'a, T, L = DefaultMutex> !Sync for Lock<'a, T, L>
impl<'a, T, L = DefaultMutex> !UnwindSafe for Lock<'a, T, L>
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
source§impl<F> IntoFuture for Fwhere
    F: Future,
 
impl<F> IntoFuture for Fwhere
    F: Future,
§type IntoFuture = F
 
type IntoFuture = F
Which kind of future are we turning this into?
source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
 
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more