[−][src]Trait libp2p::core::Executor
Implemented on objects that can run a Future
in the background.
Note: While it may be tempting to implement this trait on types such as
futures::stream::FuturesUnordered
, please note that passing anExecutor
is optional, and thatFuturesUnordered
(or a similar struct) will automatically be used as fallback by libp2p. TheExecutor
trait should therefore only be about runningFuture
s in the background.
Required methods
fn exec(&self, future: Pin<Box<dyn Future<Output = ()> + 'static + Send>>)
Run the given future in the background until it ends.
Implementations on Foreign Types
impl<T> Executor for Box<T> where
T: Executor + ?Sized,
[src]
T: Executor + ?Sized,
impl<'a, T> Executor for &'a T where
T: Executor + ?Sized,
[src]
T: Executor + ?Sized,
impl<'a, T> Executor for &'a mut T where
T: Executor + ?Sized,
[src]
Loading content...
T: Executor + ?Sized,