mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: add and fix more lints, improve docs (#4765)
This commit is contained in:
@ -85,6 +85,7 @@ impl StatusBuilder {
|
||||
}
|
||||
|
||||
/// Builder for [`HelloMessage`] messages.
|
||||
#[derive(Debug)]
|
||||
pub struct HelloBuilder {
|
||||
hello: HelloMessage,
|
||||
}
|
||||
|
||||
@ -24,6 +24,7 @@ pub const MAX_MESSAGE_SIZE: usize = 10 * 1024 * 1024;
|
||||
/// An un-authenticated [`EthStream`]. This is consumed and returns a [`EthStream`] after the
|
||||
/// `Status` handshake is completed.
|
||||
#[pin_project]
|
||||
#[derive(Debug)]
|
||||
pub struct UnauthedEthStream<S> {
|
||||
#[pin]
|
||||
inner: S,
|
||||
|
||||
@ -45,6 +45,7 @@ impl HelloMessage {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct HelloMessageBuilder {
|
||||
/// The version of the `p2p` protocol.
|
||||
pub protocol_version: Option<ProtocolVersion>,
|
||||
|
||||
@ -1,15 +1,3 @@
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
#![doc(
|
||||
html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
|
||||
html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
|
||||
issue_tracker_base_url = "https://github.com/paradigmxzy/reth/issues/"
|
||||
)]
|
||||
#![warn(missing_docs, unreachable_pub)]
|
||||
#![deny(unused_must_use, rust_2018_idioms)]
|
||||
#![doc(test(
|
||||
no_crate_inject,
|
||||
attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables))
|
||||
))]
|
||||
//! Implementation of the `eth` wire protocol.
|
||||
//!
|
||||
//! ## Feature Flags
|
||||
@ -17,6 +5,15 @@
|
||||
//! - `serde` (default): Enable serde support
|
||||
//! - `arbitrary`: Adds `proptest` and `arbitrary` support for wire types.
|
||||
|
||||
#![doc(
|
||||
html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
|
||||
html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
|
||||
issue_tracker_base_url = "https://github.com/paradigmxzy/reth/issues/"
|
||||
)]
|
||||
#![warn(missing_debug_implementations, missing_docs, unreachable_pub, rustdoc::all)]
|
||||
#![deny(unused_must_use, rust_2018_idioms)]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
||||
|
||||
pub mod builder;
|
||||
pub mod capability;
|
||||
mod disconnect;
|
||||
|
||||
@ -65,6 +65,7 @@ const MAX_P2P_CAPACITY: usize = 2;
|
||||
/// An un-authenticated [`P2PStream`]. This is consumed and returns a [`P2PStream`] after the
|
||||
/// `Hello` handshake is completed.
|
||||
#[pin_project]
|
||||
#[derive(Debug)]
|
||||
pub struct UnauthedP2PStream<S> {
|
||||
#[pin]
|
||||
inner: S,
|
||||
|
||||
Reference in New Issue
Block a user