summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kreutz <mail@skreutz.com>2022-12-20 22:09:44 +0100
committerStefan Kreutz <mail@skreutz.com>2022-12-20 22:09:44 +0100
commit0669533dca1cb41ea67f9b4cac7727cf600412d1 (patch)
tree7315c9d05724778fd4ef73d96412152b20e7de64
parent44849fe54059319f445f413041ebffe07bc7d162 (diff)
downloadparseq-0669533dca1cb41ea67f9b4cac7727cf600412d1.tar
Improve documentation
-rw-r--r--src/lib.rs23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 7022d37..60d3546 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -23,15 +23,22 @@
//! assert_eq!(iter.next(), None);
//! ```
//!
-//! # Rationale
+//! See the `examples` directory for a real world example.
//!
-//! This library was created to process a large number of files returned by
-//! [walkdir](https://crates.io/crates/walkdir) in parallel, in order, and in constant space. It's
-//! API and dependencies were kept to a minimum to ease maintenance.
+//! # Features
+//!
+//! * Parseq utilizes a configurable number of worker threads
+//! * Parseq preserves the order of the original iterator
+//! * Parseq is lazy in the sense that it doesn't consume from the original iterator before [`next`](`Iterator::next`) is called for the first time
+//! * Parseq doesn't [`fuse`](`Iterator::fuse`) the original iterator
+//! * Parseq uses constant space: linear in the number of threads and the size of the buffer, not in the length of the possibly infinite original iterator
+//! * Parseq propagates panics from the given closure
+//!
+//! # Alternatives
//!
//! If you don't care about the order of the returned iterator you'll probably want to use
-//! [rayon](https://crates.io/crates/rayon) instead. If you do care about the order, take a look at
-//! [pariter](https://crates.io/crates/pariter). The latter provides more functionality than this
+//! [Rayon](https://crates.io/crates/rayon) instead. If you do care about the order, take a look at
+//! [Pariter](https://crates.io/crates/pariter). The latter provides more functionality than this
//! crate and predates it.
#![forbid(unsafe_code)]
@@ -55,7 +62,7 @@ pub trait ParallelIterator {
///
/// * preserves the order of the original iterator
/// * is lazy in the sense that it doesn't consume from the original iterator before [`next`](`Iterator::next`) is called for the first time
- /// * doesn't fuse the original iterator
+ /// * doesn't [`fuse`](`Iterator::fuse`) the original iterator
/// * uses constant space: linear in `threads` and `buffer_size`, not in the length of the possibly infinite original iterator
/// * propagates panics from the given closure
///
@@ -103,7 +110,7 @@ pub trait ParallelIterator {
///
/// * preserves the order of the original iterator
/// * is lazy in the sense that it doesn't consume from the original iterator before [`next`](`Iterator::next`) is called for the first time
- /// * doesn't fuse the original iterator
+ /// * doesn't [`fuse`](`Iterator::fuse`) the original iterator
/// * uses constant space: linear in `threads` and `buffer_size`, not in the length of the possibly infinite original iterator
/// * propagates panics from the given closure
///
Generated by cgit. See skreutz.com for my tech blog and contact information.