pub fn in_range(&self, range: std::ops::Range<T>) -> bool
    where
        T: std::cmp::PartialOrd<T>,
    {
        if self.count == 0 {
            return true;
        }
        if let Some(dfl) = self.default.as_ref() {
            return dfl.ge(&range.start) && dfl.lt(&range.end);
        }
        if let Some((first, last)) = self.first_last() {
            return first >= range.start && last < range.end;
        }
        false
    }
/// Check if all items fall in the range.
///
/// We assume that the items are ordered, and check only
/// the first and last item.
Check if all items fall in the range.
We assume that the items are ordered, and check only
the first and last item.
Check if all items fall in the range . We assume that the items are ordered and check only the first and last item .
pub fn in_range(&self, range: std::ops::Range<T>) -> bool
    where
        T: std::cmp::PartialOrd<T>,
    {
        if self.count == 0 {
            return true;
        }
        if let Some(dfl) = self.default.as_ref() {
            return dfl.ge(&range.start) && dfl.lt(&range.end);
        }
        if let Some((first, last)) = self.first_last() {
            return first >= range.start && last < range.end;
        }
        false
    }
pub fn in_range ( & self , range : std :: ops :: Range < T > ) -> bool where T : std :: cmp :: PartialOrd < T > , { if self . count == 0 { return true ; } if let Some ( dfl ) = self . default . as_ref ( ) { return dfl . ge ( & range . start ) && dfl . lt ( & range . end ) ; } if let Some ( ( first , last ) ) = self . first_last ( ) { return first >= range . start && last < range . end ; } false }
Check if all items fall in the range.
Check if all items fall in the range .
&self
range
std::ops::Range<T>
&self
range
std::ops::Range<T>