pub struct AcquireOwned<Lock = Spinlock>where
    Lock: RawMutex,{ /* private fields */ }Expand description
Future returned from Semaphore::acquire_owned().
This is identical to the Acquire future, except that it takes an
Arc reference to the Semaphore, allowing the returned future to
live for the 'static lifetime, and returns an OwnedPermit (rather
than a Permit), which is also valid for the 'static lifetime.
§Notes
This future is !Unpin, as it is unsafe to core::mem::forget an
AcquireOwned future once it has been polled. For instance, the
following code must not compile:
ⓘ
 use maitake_sync::semaphore::AcquireOwned;
 // Calls to this function should only compile if `T` is `Unpin`.
 fn assert_unpin<T: Unpin>() {}
 assert_unpin::<AcquireOwned<'_>>();Trait Implementations§
Source§impl<Lock> Debug for AcquireOwned<Lock>
 
impl<Lock> Debug for AcquireOwned<Lock>
Source§impl<Lock> Drop for AcquireOwned<Lock>where
    Lock: RawMutex,
 
impl<Lock> Drop for AcquireOwned<Lock>where
    Lock: RawMutex,
Source§impl<Lock> Future for AcquireOwned<Lock>where
    Lock: RawMutex,
 
impl<Lock> Future for AcquireOwned<Lock>where
    Lock: RawMutex,
impl<Lock> Sync for AcquireOwned<Lock>where
    Lock: RawMutex,
impl<'pin, Lock> Unpin for AcquireOwned<Lock>
Auto Trait Implementations§
impl<Lock = Spinlock> !Freeze for AcquireOwned<Lock>
impl<Lock = Spinlock> !RefUnwindSafe for AcquireOwned<Lock>
impl<Lock> Send for AcquireOwned<Lock>
impl<Lock = Spinlock> !UnwindSafe for AcquireOwned<Lock>
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
§impl<T> Instrument for T
 
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Instrument for T
 
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
Source§impl<F> IntoFuture for Fwhere
    F: Future,
 
impl<F> IntoFuture for Fwhere
    F: Future,
Source§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