add notes for the Copy requirement
This commit is contained in:
@@ -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
@@ -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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user