From ef169a6652153642311907b4a250c8271b14db5d Mon Sep 17 00:00:00 2001 From: Jackson Sandland Date: Fri, 30 Mar 2018 10:43:38 -0700 Subject: [PATCH] 94: source doc review --- src/accountant.rs | 4 ++-- src/accountant_skel.rs | 4 ++-- src/accountant_stub.rs | 2 +- src/entry.rs | 6 +++--- src/event.rs | 2 +- src/hash.rs | 2 +- src/historian.rs | 2 +- src/ledger.rs | 2 +- src/mint.rs | 2 +- src/plan.rs | 2 +- src/recorder.rs | 2 +- src/result.rs | 2 +- src/signature.rs | 2 +- src/streamer.rs | 2 +- 14 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/accountant.rs b/src/accountant.rs index 5f25589304..8c2fb048c8 100644 --- a/src/accountant.rs +++ b/src/accountant.rs @@ -1,6 +1,6 @@ -//! The Accountant tracks client balances and the progress of pending +//! The `accountant` module tracks client balances, and the progress of pending //! transactions. It offers a high-level public API that signs transactions -//! on behalf of the caller and a private low-level API for when they have +//! on behalf of the caller, and a private low-level API for when they have //! already been signed and verified. use chrono::prelude::*; diff --git a/src/accountant_skel.rs b/src/accountant_skel.rs index a2909473d0..924385df92 100644 --- a/src/accountant_skel.rs +++ b/src/accountant_skel.rs @@ -1,6 +1,6 @@ -//! The AccountantSkel is a microservice that exposes the high-level +//! The `accountantSkel` module is a microservice that exposes the high-level //! Accountant API to the network. Its message encoding is currently -//! in flux. Clients should AccountantStub to interact with it. +//! in flux. Clients should use AccountantStub to interact with it. use accountant::Accountant; use bincode::{deserialize, serialize}; diff --git a/src/accountant_stub.rs b/src/accountant_stub.rs index 1b97a550c1..65aae7b713 100644 --- a/src/accountant_stub.rs +++ b/src/accountant_stub.rs @@ -1,4 +1,4 @@ -//! A AccountantStub is client-side object that interfaces with a server-side Accountant +//! The `accountantStub` module is a client-side object that interfaces with a server-side Accountant //! object via the network interface exposed by AccountantSkel. Client code should use //! this object instead of writing messages to the network directly. The binary //! encoding of its messages are unstable and may change in future releases. diff --git a/src/entry.rs b/src/entry.rs index 59b94ee40c..985bab83cc 100644 --- a/src/entry.rs +++ b/src/entry.rs @@ -1,6 +1,6 @@ -//! An Entry is a fundamental building block of Proof of History. It contains a -//! unqiue ID that is the hash of the Entry before it plus the hash of the -//! transactins within it. Entries cannot be reordered and its field `num_hashes` +//! The `entry` module is a fundamental building block of Proof of History. It contains a +//! unique ID that is the hash of the Entry before it, plus the hash of the +//! transactions within it. Entries cannot be reordered, and its field `num_hashes` //! represents an approximate amount of time since the last Entry was created. use event::Event; use hash::{extend_and_hash, hash, Hash}; diff --git a/src/event.rs b/src/event.rs index c3620d0be4..9940959a3d 100644 --- a/src/event.rs +++ b/src/event.rs @@ -1,4 +1,4 @@ -//! An Event may be a Transaction or a Witness used to process a pending +//! The `event` module handles events, which may be a `Transaction`, or a `Witness` used to process a pending //! Transaction. use bincode::serialize; diff --git a/src/hash.rs b/src/hash.rs index 4b6dbff053..ee7598a0dc 100644 --- a/src/hash.rs +++ b/src/hash.rs @@ -1,4 +1,4 @@ -//! A module for creating SHA-256 hashes. +//! The `hash` module provides functions for creating SHA-256 hashes. use generic_array::GenericArray; use generic_array::typenum::U32; diff --git a/src/historian.rs b/src/historian.rs index 9fadcb148e..3bf92668d0 100644 --- a/src/historian.rs +++ b/src/historian.rs @@ -1,4 +1,4 @@ -//! The Historian provides a microservice for generating a Proof of History. +//! The `historian` module provides a microservice for generating a Proof of History. //! It manages a thread containing a Proof of History Recorder. use entry::Entry; diff --git a/src/ledger.rs b/src/ledger.rs index f35deac738..50657b828c 100644 --- a/src/ledger.rs +++ b/src/ledger.rs @@ -1,4 +1,4 @@ -//! The `ledger` module provides the functions for parallel verification of the +//! The `ledger` module provides functions for parallel verification of the //! Proof of History ledger. use entry::{next_tick, Entry}; diff --git a/src/mint.rs b/src/mint.rs index 5799d97910..7f0339b546 100644 --- a/src/mint.rs +++ b/src/mint.rs @@ -1,4 +1,4 @@ -//! A library for generating the chain's genesis block. +//! The `mint` module is a library for generating the chain's genesis block. use entry::Entry; use entry::create_entry; diff --git a/src/plan.rs b/src/plan.rs index 81061b4b5e..adefe61332 100644 --- a/src/plan.rs +++ b/src/plan.rs @@ -1,4 +1,4 @@ -//! A domain-specific language for payment plans. Users create Plan objects that +//! The `plan` module provides a domain-specific language for payment plans. Users create Plan objects that //! are given to an interpreter. The interpreter listens for `Witness` events, //! which it uses to reduce the payment plan. When the plan is reduced to a //! `Payment`, the payment is executed. diff --git a/src/recorder.rs b/src/recorder.rs index 0bfd666742..40536458c7 100644 --- a/src/recorder.rs +++ b/src/recorder.rs @@ -1,7 +1,7 @@ //! The `recorder` module provides an object for generating a Proof of History. //! It records Event items on behalf of its users. It continuously generates //! new hashes, only stopping to check if it has been sent an Event item. It -//! tags each Event with an Entry and sends it back. The Entry includes the +//! tags each Event with an Entry, and sends it back. The Entry includes the //! Event, the latest hash, and the number of hashes since the last event. //! The resulting stream of entries represents ordered events in time. diff --git a/src/result.rs b/src/result.rs index 7bef766b59..81a3a66678 100644 --- a/src/result.rs +++ b/src/result.rs @@ -1,4 +1,4 @@ -//! Exposes a Result type that propagates one of many different Error types. +//! The `result` module exposes a Result type that propagates one of many different Error types. use bincode; use serde_json; diff --git a/src/signature.rs b/src/signature.rs index 2b5cbc3772..5f3aee61ea 100644 --- a/src/signature.rs +++ b/src/signature.rs @@ -1,4 +1,4 @@ -//! The `signature` module provides functionality for public and private keys +//! The `signature` module provides functionality for public, and private keys. use generic_array::GenericArray; use generic_array::typenum::{U32, U64}; diff --git a/src/streamer.rs b/src/streamer.rs index 5a26840ffc..9096f3fe64 100644 --- a/src/streamer.rs +++ b/src/streamer.rs @@ -1,4 +1,4 @@ -//! A module for efficient batch processing of UDP packets. +//! The 'streamer` module allows for efficient batch processing of UDP packets. use result::{Error, Result}; use std::fmt;