[][src]Trait smartpool::channel::Exec

pub trait Exec {
    fn submit(&self, task: RunningTask);

    fn exec(
        &self,
        future: impl Future<Item = (), Error = ()> + Send + 'static
    ) { ... }
fn exec_push<I: Send + 'static, E: Send + 'static>(
        &self,
        future: impl Future<Item = I, Error = E> + Send + 'static
    ) -> PushFutureRecv<I, E> { ... } }

Trait for channels for which a task can be submitted.

Required methods

fn submit(&self, task: RunningTask)

Submit a raw running task.

Loading content...

Provided methods

fn exec(
    &self,
    future: impl Future<Item = (), Error = ()> + Send + 'static
)

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
) -> PushFutureRecv<I, E>

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

Loading content...

Implementations on Foreign Types

impl<E: Exec> Exec for Arc<RwLock<E>>[src]

Shared exec implementation.

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

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

Loading content...

Implementors

impl Exec for VecDequeChannel[src]

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

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

impl<Inner: Channel + Exec> Exec for MultiChannel<Inner>[src]

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

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

Loading content...