Skip to main content

Sequencer

Trait Sequencer 

Source
pub trait Sequencer<Req> {
    type Ticket: Turn;

    // Required method
    fn ticket(&self, req: &mut Req) -> Option<Self::Ticket>;
}
Expand description

Source of tickets for Ordered.

Required Associated Types§

Source

type Ticket: Turn

Ticket type.

Required Methods§

Source

fn ticket(&self, req: &mut Req) -> Option<Self::Ticket>

Returns the ticket of a request, None for a request that is not ordered.

Called synchronously when Ordered starts handling the request.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<Req, F, T> Sequencer<Req> for External<F>
where F: Fn(&mut Req) -> Option<T>, T: Turn,

Source§

impl<Req, F> Sequencer<Req> for Arrival<F>
where F: Fn(&Req) -> bool,

Source§

impl<Req> Sequencer<Req> for Arrival