pub fn range<R>(&self, range: R) -> Tuples<K, V>
    where
        R: RangeBounds<K>,
    {
        use std::ops::Bound::*;
        let start = match range.start_bound() {
            Included(key) => self.find_first_position(key).either().into(),
            Excluded(key) => self.find_last_position(key).either().into(),
            Unbounded => Some(0),
        };

        let end = match range.end_bound() {
            Included(key) => self.find_last_position(key).either(),
            Excluded(key) => self.find_first_position(key).either(),
            Unbounded => self.len(),
        };

        let skip = start.unwrap_or(self.keys.len());
        let take = if end <= skip { 0 } else { end };

        Tuples {
            keys: &self.keys,
            values: &self.values,
            low: skip,
            high: take,
        }
    }
/// Returns an iterator over the specified range of tuples
Returns an iterator over the specified range of tuples
Returns an iterator over the specified range of tuples
pub fn range<R>(&self, range: R) -> Tuples<K, V>
    where
        R: RangeBounds<K>,
    {
        use std::ops::Bound::*;
        let start = match range.start_bound() {
            Included(key) => self.find_first_position(key).either().into(),
            Excluded(key) => self.find_last_position(key).either().into(),
            Unbounded => Some(0),
        };
        let end = match range.end_bound() {
            Included(key) => self.find_last_position(key).either(),
            Excluded(key) => self.find_first_position(key).either(),
            Unbounded => self.len(),
        };
        let skip = start.unwrap_or(self.keys.len());
        let take = if end <= skip { 0 } else { end };
        Tuples {
            keys: &self.keys,
            values: &self.values,
            low: skip,
            high: take,
        }
    }
pub fn range < R > ( & self , range : R ) -> Tuples < K , V > where R : RangeBounds < K > , { use std :: ops :: Bound :: * ; let start = match range . start_bound ( ) { Included ( key ) => self . find_first_position ( key ) . either ( ) . into ( ) , Excluded ( key ) => self . find_last_position ( key ) . either ( ) . into ( ) , Unbounded => Some ( 0 ) , } ; let end = match range . end_bound ( ) { Included ( key ) => self . find_last_position ( key ) . either ( ) , Excluded ( key ) => self . find_first_position ( key ) . either ( ) , Unbounded => self . len ( ) , } ; let skip = start . unwrap_or ( self . keys . len ( ) ) ; let take = if end <= skip { 0 } else { end } ; Tuples { keys : & self . keys , values : & self . values , low : skip , high : take , } }
Returns an iterator over the specified range of tuples
Returns an iterator over the specified range of tuples
&self
range
R
&self
range
R