From 3cd23a9b3b1785b6e88cceef49e1a4a8dc9b37f0 Mon Sep 17 00:00:00 2001 From: Martin Ockajak Date: Mon, 29 Jul 2024 14:45:59 +0200 Subject: [PATCH] Update documentation --- README.md | 21 ++++++++++++--------- src/lib.rs | 21 ++++++++++++--------- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 2176c60..95329f9 100644 --- a/README.md +++ b/README.md @@ -8,14 +8,24 @@ Practical extension methods for Rust standard library collections. Enables direct functional-style collection manipulation without the usual iterator boilerplate. -## Features +## Overview - Equivalents of standard iterator methods are added to standard library collections - Additional utility methods commonly found in collection libraries are also included -- Transformation methods return a new collection instance instead of returning an iterator +- Methods which modify a collection return a new collection instance instead of an iterator - All methods treat collection instances as immutable although some may consume them - Performance is near optimal and overhead is limited to new collection creation + +## Functionality + +- [Searching](#searching) - [Modifying](#modifying) - [Filtering](#filtering) - +[Mapping](#mapping) - [Inspecting](#inspecting) - [Aggregating](#aggregating) + +- [Selecting](#selecting) - [Converting](#converting) - [Partitioning](#partitioning) - +[Merging](#merging) - [Sorting](#sorting) - [Miscellaneous](#miscellaneous) + + ## Examples ```rust @@ -45,13 +55,6 @@ a.rev().into_iter().into_deque(); // VecDeque::from([3, 2, 1]) ## Methods -[Searching](#searching) - [Modifying](#modifying) - [Filtering](#filtering) - -[Mapping](#mapping) - [Inspecting](#inspecting) - [Aggregating](#aggregating) - -[Selecting](#selecting) - [Converting](#converting) - [Partitioning](#partitioning) - -[Merging](#merging) - [Sorting](#sorting) - [Miscellaneous](#miscellaneous) - - ### Searching | Method / Collection type | Vec, VecDeque, LinkedList | Slice | HashSet, BTreeSet, BinaryHeap | HashMap, BTreeMap | Consuming | diff --git a/src/lib.rs b/src/lib.rs index 6ab7932..f46f64a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,14 +5,24 @@ //! Enables direct functional-style collection manipulation without the usual iterator boilerplate. //! //! -//! ## Features +//! ## Overview //! //! - Equivalents of standard iterator methods are added to standard library collections //! - Additional utility methods commonly found in collection libraries are also included -//! - Transformation methods return a new collection instance instead of returning an iterator +//! - Methods which modify a collection return a new collection instance instead of an iterator //! - All methods treat collection instances as immutable although some may consume them //! - Performance is near optimal and overhead is limited to new collection creation //! +//! +//! ## Functionality +//! +//! - [Searching](#searching) - [Modifying](#modifying) - [Filtering](#filtering) - +//! [Mapping](#mapping) - [Inspecting](#inspecting) - [Aggregating](#aggregating) +//! +//! - [Selecting](#selecting) - [Converting](#converting) - [Partitioning](#partitioning) - +//! [Merging](#merging) - [Sorting](#sorting) - [Miscellaneous](#miscellaneous) +//! +//! //! ## Examples //! //! ```rust @@ -51,13 +61,6 @@ //! //! ## Methods //! -//! [Searching](#searching) - [Modifying](#modifying) - [Filtering](#filtering) - -//! [Mapping](#mapping) - [Inspecting](#inspecting) - [Aggregating](#aggregating) -//! -//! [Selecting](#selecting) - [Converting](#converting) - [Partitioning](#partitioning) - -//! [Merging](#merging) - [Sorting](#sorting) - [Miscellaneous](#miscellaneous) -//! -//! //! ### Searching //! //! | Method / Collection type | Vec, VecDeque, LinkedList | Slice | HashSet, BTreeSet, BinaryHeap | HashMap, BTreeMap | Consuming |