[][src]Struct smartpool::channel::ShortestDeadlineFirst

pub struct ShortestDeadlineFirst { /* fields omitted */ }

A priority channel where each task corresponds to a time::SteadyTime deadline, and the task with the earliest deadline will be executed first.

Methods

impl ShortestDeadlineFirst[src]

pub fn new() -> Self[src]

impl ShortestDeadlineFirst[src]

pub fn exec_after(
    &self,
    future: impl Future<Item = (), Error = ()> + Send + 'static,
    delay: Duration
)
[src]

Submit a future, with the deadline equal to a certain duration after the present.

Trait Implementations

impl Channel for ShortestDeadlineFirst[src]

fn into_shared(self) -> Arc<RwLock<Self>> where
    Self: Sized
[src]

Wrap self in a reference counted read/write lock, which is still a channel, and can have shared ownership, allowing it to be used in a scheduler. Read more

impl ExecParam for ShortestDeadlineFirst[src]

type Param = SteadyTime

fn exec(
    &self,
    future: impl Future<Item = (), Error = ()> + Send + 'static,
    param: Self::Param
)
[src]

Execute a future on this channel.

fn exec_push<I: Send + 'static, E: Send + 'static>(
    &self,
    future: impl Future<Item = I, Error = E> + Send + 'static,
    param: Self::Param
) -> PushFutureRecv<I, E>
[src]

Execute a future on this channel, and push the result to a push future.

Auto Trait Implementations

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.