Skip to main content

Turn

Trait Turn 

Source
pub trait Turn {
    // Required method
    fn poll_turn(&self, cx: &mut Context<'_>) -> Poll<Result<(), Canceled>>;
}
Expand description

Position of a request in an ordered sequence.

Dropping a ticket that holds the turn passes the turn to the next ticket; dropping a ticket before its turn skips its position.

Required Methods§

Source

fn poll_turn(&self, cx: &mut Context<'_>) -> Poll<Result<(), Canceled>>

Polls until this ticket holds the turn.

Returns Err(Canceled) if the ticket is canceled.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§