pub(crate) struct Acquire<'a> {
node: Waiter,
semaphore: &'a Semaphore,
num_permits: usize,
queued: bool,
}Fields§
§node: Waiter§semaphore: &'a Semaphore§num_permits: usize§queued: boolWhether Acquire::drop must clean up after the waiter, by removing it
from the wait queue if it is still linked and returning the permits
assigned to it to the semaphore.
This is set as soon as poll_acquire assigns permits to the waiter or
links it into the wait queue, and it is only cleared once the future
completes and the permits are handed to the caller.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> !Freeze for Acquire<'a>
impl<'a> !RefUnwindSafe for Acquire<'a>
impl<'a> Send for Acquire<'a>
impl<'a> !Unpin for Acquire<'a>
impl<'a> !UnsafeUnpin for Acquire<'a>
impl<'a> !UnwindSafe 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