pub struct Range<Idx> {
pub start: Idx,
pub end: Idx,
}
🔬This is a nightly-only experimental API. (
new_range_api
)Expand description
A (half-open) range bounded inclusively below and exclusively above
(start..end
in a future edition).
The range start..end
contains all values with start <= x < end
.
It is empty if start >= end
.
§Examples
#![feature(new_range_api)]
use core::range::Range;
assert_eq!(Range::from(3..5), Range { start: 3, end: 5 });
assert_eq!(3 +