From: Matt Corallo Date: Wed, 17 Mar 2021 18:18:37 +0000 (-0400) Subject: Enforce no missing docs in all crates (+ add docs that were missing) X-Git-Tag: v0.0.14~46^2~2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=2c7c1a6a7a7796d6cbef4a2549fc0a7338fc8fb9;p=rust-lightning Enforce no missing docs in all crates (+ add docs that were missing) --- diff --git a/background-processor/src/lib.rs b/background-processor/src/lib.rs index 23c18623d..286bfeddf 100644 --- a/background-processor/src/lib.rs +++ b/background-processor/src/lib.rs @@ -1,4 +1,9 @@ +//! Utilities that take care of tasks that (1) need to happen periodically to keep Rust-Lightning +//! running properly, and (2) either can or should be run in the background. See docs for +//! [`BackgroundProcessor`] for more details on the nitty-gritty. + #![deny(broken_intra_doc_links)] +#![deny(missing_docs)] #![deny(unsafe_code)] #[macro_use] extern crate lightning; diff --git a/lightning-block-sync/src/http.rs b/lightning-block-sync/src/http.rs index a33d919d0..f745e138f 100644 --- a/lightning-block-sync/src/http.rs +++ b/lightning-block-sync/src/http.rs @@ -1,3 +1,6 @@ +//! Simple HTTP implementation which supports both async and traditional execution environments +//! with minimal dependencies. This is used as the basis for REST and RPC clients. + use chunked_transfer; use serde_json; diff --git a/lightning-block-sync/src/init.rs b/lightning-block-sync/src/init.rs index e9ff09894..d51cd3ba6 100644 --- a/lightning-block-sync/src/init.rs +++ b/lightning-block-sync/src/init.rs @@ -1,3 +1,6 @@ +//! Utilities to assist in the initial sync required to initialize or reload Rust-Lightning objects +//! from disk. + use crate::{BlockSource, BlockSourceResult, Cache, ChainNotifier}; use crate::poll::{ChainPoller, Validate, ValidatedBlockHeader}; diff --git a/lightning-block-sync/src/lib.rs b/lightning-block-sync/src/lib.rs index 96f811d3e..6f227b108 100644 --- a/lightning-block-sync/src/lib.rs +++ b/lightning-block-sync/src/lib.rs @@ -17,6 +17,7 @@ //! [`BlockSource`]: trait.BlockSource.html #![deny(broken_intra_doc_links)] +#![deny(missing_docs)] #![deny(unsafe_code)] #[cfg(any(feature = "rest-client", feature = "rpc-client"))] diff --git a/lightning-block-sync/src/poll.rs b/lightning-block-sync/src/poll.rs index 34be2437c..e769fe853 100644 --- a/lightning-block-sync/src/poll.rs +++ b/lightning-block-sync/src/poll.rs @@ -1,3 +1,5 @@ +//! Adapters that make one or more [`BlockSource`]s simpler to poll for new chain tip transitions. + use crate::{AsyncBlockSourceResult, BlockHeaderData, BlockSource, BlockSourceError, BlockSourceResult}; use bitcoin::blockdata::block::Block; diff --git a/lightning-block-sync/src/rest.rs b/lightning-block-sync/src/rest.rs index 3aff104d5..4c1938827 100644 --- a/lightning-block-sync/src/rest.rs +++ b/lightning-block-sync/src/rest.rs @@ -1,3 +1,6 @@ +//! Simple REST client implementation which implements [`BlockSource`] against a Bitcoin Core REST +//! endpoint. + use crate::{BlockHeaderData, BlockSource, AsyncBlockSourceResult}; use crate::http::{BinaryResponse, HttpEndpoint, HttpClient, JsonResponse}; diff --git a/lightning-block-sync/src/rpc.rs b/lightning-block-sync/src/rpc.rs index d59401e0f..cc3bc4525 100644 --- a/lightning-block-sync/src/rpc.rs +++ b/lightning-block-sync/src/rpc.rs @@ -1,3 +1,6 @@ +//! Simple RPC client implementation which implements [`BlockSource`] against a Bitcoin Core RPC +//! endpoint. + use crate::{BlockHeaderData, BlockSource, AsyncBlockSourceResult}; use crate::http::{HttpClient, HttpEndpoint, JsonResponse}; diff --git a/lightning-persister/src/lib.rs b/lightning-persister/src/lib.rs index 1b343ce16..3db95f35a 100644 --- a/lightning-persister/src/lib.rs +++ b/lightning-persister/src/lib.rs @@ -1,4 +1,7 @@ +//! Utilities that handle persisting Rust-Lightning data to disk via standard filesystem APIs. + #![deny(broken_intra_doc_links)] +#![deny(missing_docs)] mod util; @@ -74,6 +77,7 @@ impl FilesystemPersister { } } + /// Get the directory which was provided when this persister was initialized. pub fn get_data_dir(&self) -> String { self.path_to_channel_data.clone() }