Crates.io | more_ranges |
lib.rs | more_ranges |
version | 0.1.0 |
source | src |
created_at | 2021-02-07 21:07:36.779032 |
updated_at | 2021-02-07 21:07:36.779032 |
description | Range types not provided in the standard library. |
homepage | |
repository | https://github.com/Anders429/more_ranges |
max_upload_size | |
id | 352072 |
size | 23,141 |
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
. However, they do not function as
Iterator
s, nor can they be used in
indexing.
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 };
This crate is guaranteed to compile on stable rustc 1.28.0
and up.
This project is licensed under either of
at your option.
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.