btree_range_map/range/
from_excluded_to_included.rs1use std::ops::{Bound, RangeBounds};
2
3pub struct RangeFromExcludedToIncluded<T> {
5 pub start: T,
6 pub end: T,
7}
8
9impl<T> RangeFromExcludedToIncluded<T> {
10 pub const fn new(start: T, end: T) -> RangeFromExcludedToIncluded<T> {
11 RangeFromExcludedToIncluded { start, end }
12 }
13}
14
15impl<T> RangeBounds<T> for RangeFromExcludedToIncluded<T> {
16 fn start_bound(&self) -> Bound<&T> {
17 Bound::Excluded(&self.start)
18 }
19
20 fn end_bound(&self) -> Bound<&T> {
21 Bound::Included(&self.end)
22 }
23}