mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
18 lines
660 B
Rust
18 lines
660 B
Rust
/// Traits for implementing P2P Header Clients. Also includes implementations
|
|
/// of a Linear and a Parallel downloader generic over the [`Consensus`] and
|
|
/// [`HeadersClient`].
|
|
///
|
|
/// [`Consensus`]: crate::consensus::Consensus
|
|
/// [`HeadersClient`]: crate::p2p::headers::HeadersClient
|
|
pub mod headers;
|
|
|
|
/// Error types broadly used by p2p interfaces for any operation which may produce an error when
|
|
/// interacting with the network implementation
|
|
pub mod error;
|
|
|
|
use futures::Stream;
|
|
use std::pin::Pin;
|
|
|
|
/// The stream of responses from the connected peers, generic over the response type.
|
|
pub type MessageStream<T> = Pin<Box<dyn Stream<Item = T> + Send>>;
|