pub struct Admission<'call, 'turn, 'd: 'turn> { /* private fields */ }Expand description
One admitted child descent, retaining the original poll context. Consuming it transfers the parent’s credit to a task that owns completion.
Implementations§
Source§impl<'call, 'turn, 'd: 'turn> Admission<'call, 'turn, 'd>
impl<'call, 'turn, 'd: 'turn> Admission<'call, 'turn, 'd>
Sourcepub fn context(&mut self) -> &mut Context<'turn, 'd>
pub fn context(&mut self) -> &mut Context<'turn, 'd>
Borrows the context for setup before the admitted child descent.
Sourcepub fn poll<F: Fiber<'d>>(
self,
fiber: Pin<&mut Task<F>>,
) -> (Poll<F::Output>, &'call mut Context<'turn, 'd>)
pub fn poll<F: Fiber<'d>>( self, fiber: Pin<&mut Task<F>>, ) -> (Poll<F::Output>, &'call mut Context<'turn, 'd>)
Transfers the existing credit exactly once and returns the context for subsequent work. A completed task remains pending without repolling its former fiber; additional child polls through the context pay a credit.
Source§impl<'call, 'turn, 'd: 'turn> Admission<'call, 'turn, 'd>
impl<'call, 'turn, 'd: 'turn> Admission<'call, 'turn, 'd>
Sourcepub unsafe fn invoke<F: Fiber<'d>>(
self,
fiber: Pin<&mut F>,
) -> (Poll<F::Output>, &'call mut Context<'turn, 'd>)
pub unsafe fn invoke<F: Fiber<'d>>( self, fiber: Pin<&mut F>, ) -> (Poll<F::Output>, &'call mut Context<'turn, 'd>)
§Safety
Own the unfinished pinned fiber and drop it before exposing its Ready output. Delegation may return only to the enclosing owner that performs that drop.
Auto Trait Implementations§
impl<'call, 'turn, 'd> !RefUnwindSafe for Admission<'call, 'turn, 'd>
impl<'call, 'turn, 'd> !Send for Admission<'call, 'turn, 'd>
impl<'call, 'turn, 'd> !Sync for Admission<'call, 'turn, 'd>
impl<'call, 'turn, 'd> !UnwindSafe for Admission<'call, 'turn, 'd>
impl<'call, 'turn, 'd> Forget for Admission<'call, 'turn, 'd>
impl<'call, 'turn, 'd> Freeze for Admission<'call, 'turn, 'd>
impl<'call, 'turn, 'd> Move for Admission<'call, 'turn, 'd>
impl<'call, 'turn, 'd> Unpin for Admission<'call, 'turn, 'd>
impl<'call, 'turn, 'd> UnsafeUnpin for Admission<'call, 'turn, 'd>where
&'call mut Context<'turn, 'd>: UnsafeUnpin,
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