[][src]Trait mail_core::context::OffloaderComponent

pub trait OffloaderComponent: Debug + Send + Sync + 'static {
    fn offload<F>(&self, fut: F) -> SendBoxFuture<F::Item, F::Error>
    where
        F: Future + Send + 'static,
        F::Item: Send + 'static,
        F::Error: Send + 'static
; }

Trait needed to be implemented for providing the offloading parts to a CompositeContext.

Required methods

fn offload<F>(&self, fut: F) -> SendBoxFuture<F::Item, F::Error> where
    F: Future + Send + 'static,
    F::Item: Send + 'static,
    F::Error: Send + 'static, 

Calls to Context::offload and Context::offload_fn will be forwarded to this method.

Loading content...

Implementations on Foreign Types

impl OffloaderComponent for CpuPool[src]

fn offload<F>(&self, fut: F) -> SendBoxFuture<F::Item, F::Error> where
    F: Future + Send + 'static,
    F::Item: Send + 'static,
    F::Error: Send + 'static, 
[src]

executes the futures fut "elswhere" e.g. in a cpu pool

Loading content...

Implementors

impl<C> OffloaderComponent for C where
    C: Context
[src]

Allows using a part of an context as an component.

Loading content...