pub struct Acquire<'a> { /* private fields */ }Expand description
The wait for permits of Semaphore::acquire and
Semaphore::acquire_many.
Cancel safe: dropping it gives up its place in line; if its permits were already granted, they go back and the next waiter is served.
Trait Implementations§
Source§impl<'a> Future for Acquire<'a>
impl<'a> Future for Acquire<'a>
Source§type Output = Result<SemaphorePermit<'a>, AcquireError>
type Output = Result<SemaphorePermit<'a>, AcquireError>
The type of value produced on completion.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Acquire<'a>
impl<'a> !Send for Acquire<'a>
impl<'a> !Sync for Acquire<'a>
impl<'a> !UnwindSafe for Acquire<'a>
impl<'a> Freeze for Acquire<'a>
impl<'a> Unpin for Acquire<'a>
impl<'a> UnsafeUnpin for Acquire<'a>
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,
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