pub fn iter(&self) -> Iter<'_, K, V> {
        if let Some(root) = self.root.as_ref() {
            let first_entry = root.reborrow().first_entry();
            let last_entry = root.reborrow().last_entry(false);
            Iter {
                imp: search::IterImpl::new(first_entry, last_entry),
                rem: self.len,
            }
        } else {
            Iter {
                imp: search::IterImpl::none(),
                rem: 0,
            }
        }
    }
/// Returns an iterator over the elements of the map, sorted by key.
///
/// # Examples
///
/// ```
/// use bptree::BpTreeMap;
///
/// let map = BpTreeMap::from([(3, "Three"), (1, "One"), (4, "Four"), (2, "Two")]);
/// for (key, value) in map.iter() {
///     println!("{}: {}", key, value);
/// }
///
/// let first_kv = map.iter().next().unwrap();
/// assert_eq!(first_kv, (&1, &"One"));
/// ```
Returns an iterator over the elements of the map, sorted by key.
Returns an iterator over the elements of the map sorted by key .
pub fn iter(&self) -> Iter<'_, K, V> {
        if let Some(root) = self.root.as_ref() {
            let first_entry = root.reborrow().first_entry();
            let last_entry = root.reborrow().last_entry(false);
            Iter {
                imp: search::IterImpl::new(first_entry, last_entry),
                rem: self.len,
            }
        } else {
            Iter {
                imp: search::IterImpl::none(),
                rem: 0,
            }
        }
    }
pub fn iter ( & self ) -> Iter < ' _ , K , V > { if let Some ( root ) = self . root . as_ref ( ) { let first_entry = root . reborrow ( ) . first_entry ( ) ; let last_entry = root . reborrow ( ) . last_entry ( false ) ; Iter { imp : search :: IterImpl :: new ( first_entry , last_entry ) , rem : self . len , } } else { Iter { imp : search :: IterImpl :: none ( ) , rem : 0 , } } }
Returns an iterator over the elements of the map, sorted by key.
Returns an iterator over the elements of the map sorted by key .
&self
&self
examples
```
use bptree::BpTreeMap.




` ` ` use bptree :: BpTreeMap .