From 81cfd6c7fd08f9b0edcfbb7ca1a192b8dfafa842 Mon Sep 17 00:00:00 2001 From: Freddie Ridell Date: Tue, 2 Apr 2019 13:16:36 +0100 Subject: [PATCH 1/3] document-src-lib-rs --- src/lib.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 65a70294..6e1df190 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,6 +4,13 @@ #![forbid(missing_docs)] #![cfg_attr(test, deny(warnings))] +//! ## Introduction +//! Hypercore is a secure, distributed append-only log. Built for sharing +//! large datasets and streams of real time data as part of the [Dat] project. +//! This is a rust port of [the original node version][dat-node] +//! aiming for interoperability. The primary way to use this crate is with the [Feed] struct. +//! +//! //! ## Example //! ```rust //! extern crate hypercore; @@ -20,6 +27,10 @@ //! println!("{:?}", feed.get(0)); // prints "hello" //! println!("{:?}", feed.get(1)); // prints "world" //! ``` +//! +//! [dat-node]: https://github.com/mafintosh/hypercore +//! [Dat]: https://github.com/datrs +//! [Feed]: crate::feed::Feed #[macro_use] extern crate failure; From 5ba8e267ef1ab0fa729a63a10314be5e225b1d41 Mon Sep 17 00:00:00 2001 From: Yoshua Wuyts Date: Thu, 4 Apr 2019 12:30:37 +0100 Subject: [PATCH 2/3] changed wording in lib.rs docs Co-Authored-By: FreddieRidell --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 6e1df190..1fe1b7e9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,7 +8,7 @@ //! Hypercore is a secure, distributed append-only log. Built for sharing //! large datasets and streams of real time data as part of the [Dat] project. //! This is a rust port of [the original node version][dat-node] -//! aiming for interoperability. The primary way to use this crate is with the [Feed] struct. +//! aiming for interoperability. The primary way to use this crate is through the [Feed] struct. //! //! //! ## Example From 89c89afa780fcbd3ae7bd3966574f962f90c3e96 Mon Sep 17 00:00:00 2001 From: Freddie Ridell Date: Thu, 4 Apr 2019 12:46:05 +0100 Subject: [PATCH 3/3] not sure how cargo fmt missed this the first time --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 1fe1b7e9..f1813234 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,7 +6,7 @@ //! ## Introduction //! Hypercore is a secure, distributed append-only log. Built for sharing -//! large datasets and streams of real time data as part of the [Dat] project. +//! large datasets and streams of real time data as part of the [Dat] project. //! This is a rust port of [the original node version][dat-node] //! aiming for interoperability. The primary way to use this crate is through the [Feed] struct. //!