[−][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 anExecutoris optional, and thatFuturesUnordered(or a similar struct) will automatically be used as fallback by libp2p. TheExecutortrait should therefore only be about runningFutures in the background.
Required methods
pub fn exec(&self, future: Pin<Box<dyn Future<Output = ()> + Send>>)[src]
Run the given future in the background until it ends.