Trait contiguous_map::InclusiveStartRangeBounds [−][src]
pub trait InclusiveStartRangeBounds<K: Key> { fn start_bound(&self) -> &K; fn end_bound(&self) -> Bound<&K>; }
Expand description
Trait similar to std::ops::RangeBounds
that requires an inclusive start to the range.
This means this trait is only usable for ranges like
1..
,
1..5
,
and 1..=5
.
Ranges like
..
,
..5
, and
..=5
are not supported.
This trait is used for looking up slices in a ContiguousMap
.
The semantics of the non-supported ranges are odd and not yet (and maybe never) implemented.
For example, with ..
you’d expect a slice that contains all of the
values in the map, however only elements with adjacent keys can be in the same slice.
Required methods
fn start_bound(&self) -> &K
fn start_bound(&self) -> &K
The inclusive starting bound of this range.