more_ranges

Crates.iomore_ranges
lib.rsmore_ranges
version0.2.0
created_at2021-02-07 21:07:36.779032+00
updated_at2025-10-18 07:26:50.602759+00
descriptionRange types not provided in the standard library.
homepage
repositoryhttps://github.com/Anders429/more_ranges
max_upload_size
id352072
size111,166
Anders Evensen (Anders429)

documentation

README

more_ranges

GitHub Workflow Status crates.io docs.rs MSRV License

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

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.

Commit count: 0

cargo fmt