2 unstable releases
| 0.2.0 | Oct 18, 2025 |
|---|---|
| 0.1.0 | Feb 7, 2021 |
#518 in Data structures
Used in 2 crates
95KB
2.5K
SLoC
more_ranges
Range types not provided in the standard library.
This crate provides range types that are bounded exclusively below. Specifically, the types provided are:
These ranges operate nearly the same as those in
std::ops. One of the main exceptions is that you must explicitly convert these ranges to Iterators using .into_iter().
Example
The range types provided here can be used by directly specifying their fields:
use more_ranges::{RangeFromExclusive, RangeFromExclusiveToExclusive, RangeFromExclusiveToInclusive};
let range_from_exclusive = RangeFromExclusive { start: 1 };
let range_from_exclusive_to_exclusive = RangeFromExclusiveToExclusive { start: 1, end: 4 };
let range_from_exclusive_to_inclusive = RangeFromExclusiveToInclusive { start: 1, end: 4 };
Minimum Supported Rust Version
This crate is tested against stable rustc 1.83.0 and up.
License
This project is licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Dependencies
~115KB