[−][src]Trait mail::context::OffloaderComponent
Trait needed to be implemented for providing the offloading parts to a CompositeContext
.
Required methods
fn offload<F>(
&self,
fut: F
) -> Box<dyn Future<Item = <F as Future>::Item, Error = <F as Future>::Error> + 'static + Send> where
F: Future + Send + 'static,
<F as Future>::Item: Send,
<F as Future>::Item: 'static,
<F as Future>::Error: Send,
<F as Future>::Error: 'static,
&self,
fut: F
) -> Box<dyn Future<Item = <F as Future>::Item, Error = <F as Future>::Error> + 'static + Send> where
F: Future + Send + 'static,
<F as Future>::Item: Send,
<F as Future>::Item: 'static,
<F as Future>::Error: Send,
<F as Future>::Error: 'static,
Calls to Context::offload
and Context::offload_fn
will be forwarded to this method.
Implementations on Foreign Types
impl OffloaderComponent for CpuPool
[src]
fn offload<F>(
&self,
fut: F
) -> Box<dyn Future<Item = <F as Future>::Item, Error = <F as Future>::Error> + 'static + Send> where
F: Future + Send + 'static,
<F as Future>::Item: Send,
<F as Future>::Item: 'static,
<F as Future>::Error: Send,
<F as Future>::Error: 'static,
[src]
&self,
fut: F
) -> Box<dyn Future<Item = <F as Future>::Item, Error = <F as Future>::Error> + 'static + Send> where
F: Future + Send + 'static,
<F as Future>::Item: Send,
<F as Future>::Item: 'static,
<F as Future>::Error: Send,
<F as Future>::Error: 'static,
executes the futures fut
"elswhere" e.g. in a cpu pool
Implementors
impl<C> OffloaderComponent for C where
C: Context,
[src]
C: Context,
Allows using a part of an context as an component.