Skip to main content

in_range

Function in_range 

Source
pub fn in_range<T: Ord + Copy>(inner: &Range<T>, outer: &Range<T>) -> bool
Expand description

Returns true if inner is fully contained inside outer.

Both ranges are treated as half-open intervals [start, end). An empty inner range is considered contained within outer iff inner.start lies within outer.start..=outer.end.