add notes for the Copy requirement

This commit is contained in:
ripytide
2023-04-21 14:40:09 +01:00
parent 57ee350bf2
commit 16e0e74f6b
3 changed files with 15 additions and 3 deletions
+7 -1
View File
@@ -12,7 +12,13 @@
This crate provides [`DiscreteRangeMap`] and [`DiscreteRangeSet`], Data
Structures for storing non-overlapping intervals based of [`BTreeMap`].
## Example using [`Range`]s
## You must implement `Copy`
Due to implementation complications with non-`Copy` types the
datastructures currently require both the range type and the points
the ranges are over to be `Copy`.
## Example using an Inclusive-Exclusive range
```rust
use range_bounds_map::test_ranges::ie;
+1 -1
View File
@@ -1,4 +1,4 @@
# todo put back to normal
# todo this file put back to normal
# - rename DiscreteRange{Set,Map} to DiscreteRange{Set,Map}
# - rename crate too
# - add link to previous crate on readme
+7 -1
View File
@@ -20,7 +20,13 @@ along with range_bounds_map. If not, see <https://www.gnu.org/licenses/>.
//! This crate provides [`DiscreteRangeMap`] and [`DiscreteRangeSet`], Data
//! Structures for storing non-overlapping intervals based of [`BTreeMap`].
//!
//! ## Example using [`Range`]s
//! ## You must implement `Copy`
//!
//! Due to implementation complications with non-`Copy` types the
//! datastructures currently require both the range type and the points
//! the ranges are over to be `Copy`.
//!
//! ## Example using an Inclusive-Exclusive range
//!
//! ```rust
//! use range_bounds_map::test_ranges::ie;