connexa 0.3.0

High level abtraction of rust-libp2p
Documentation
1
2
3
4
5
6
7
8
9
// This will internally use `async-rt` for the executor, which
// would be selected at compile-time based on target.
pub struct ConnexaExecutor;

impl libp2p::swarm::Executor for ConnexaExecutor {
    fn exec(&self, future: std::pin::Pin<Box<dyn Future<Output = ()> + 'static + Send>>) {
        async_rt::task::dispatch(future);
    }
}