mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-07-16 16:22:27 +00:00
![Thomas Eizinger](/assets/img/avatar_default.png)
This module provides an implementation of the RequestResponseCodec using a cbor serialization.
24 lines
512 B
Rust
24 lines
512 B
Rust
pub mod cbor_request_response;
|
|
pub mod encrypted_signature;
|
|
pub mod peer_tracker;
|
|
pub mod quote;
|
|
pub mod spot_price;
|
|
pub mod transfer_proof;
|
|
pub mod transport;
|
|
|
|
use libp2p::core::Executor;
|
|
use std::future::Future;
|
|
use std::pin::Pin;
|
|
use tokio::runtime::Handle;
|
|
|
|
#[allow(missing_debug_implementations)]
|
|
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);
|
|
}
|
|
}
|