Enforce no missing docs in all crates (+ add docs that were missing)
[rust-lightning] / lightning-block-sync / src / rest.rs
index 3c2e76e23d7d5ee2eebd4a957185a34fef629583..4c19388275fb935f18301600e211c118aeccda5b 100644 (file)
@@ -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};
 
@@ -24,7 +27,7 @@ impl RestClient {
        }
 
        /// Requests a resource encoded in `F` format and interpreted as type `T`.
-       async fn request_resource<F, T>(&mut self, resource_path: &str) -> std::io::Result<T>
+       pub async fn request_resource<F, T>(&mut self, resource_path: &str) -> std::io::Result<T>
        where F: TryFrom<Vec<u8>, Error = std::io::Error> + TryInto<T, Error = std::io::Error> {
                let host = format!("{}:{}", self.endpoint.host(), self.endpoint.port());
                let uri = format!("{}/{}", self.endpoint.path().trim_end_matches("/"), resource_path);