mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-08-25 19:56:27 +00:00
19 lines
379 B
Rust
19 lines
379 B
Rust
![]() |
use futures::prelude::*;
|
||
|
use libp2p::core::Executor;
|
||
|
use std::pin::Pin;
|
||
|
use tokio::runtime::Handle;
|
||
|
|
||
|
pub mod peer_tracker;
|
||
|
pub mod request_response;
|
||
|
pub mod transport;
|
||
|
|
||
|
pub struct TokioExecutor {
|
||
|
pub handle: Handle,
|
||
|
}
|
||
|
|
||
|
impl Executor for TokioExecutor {
|
||
|
fn exec(&self, future: Pin<Box<dyn Future<Output = ()> + Send>>) {
|
||
|
let _ = self.handle.spawn(future);
|
||
|
}
|
||
|
}
|