tree/
ordered_iter.rs

1extern crate ordered_iter;
2
3use self::ordered_iter::{OrderedMapIterator, OrderedSetIterator};
4use super::{map, set};
5
6impl<K, V> OrderedMapIterator for map::IntoIter<K, V> where K: Ord {
7    type Key = K;
8    type Val = V;
9}
10
11impl<'a, K, V> OrderedMapIterator for map::Iter<'a, K, V> where K: Ord {
12    type Key = &'a K;
13    type Val = &'a V;
14}
15
16impl<'a, K, V> OrderedMapIterator for map::IterMut<'a, K, V> where K: Ord {
17    type Key = &'a K;
18    type Val = &'a mut V;
19}
20
21#[cfg(feature = "range")]
22impl<K, V> OrderedMapIterator for map::IntoRange<K, V> where K: Ord {
23    type Key = K;
24    type Val = V;
25}
26
27#[cfg(feature = "range")]
28impl<'a, K, V> OrderedMapIterator for map::Range<'a, K, V> where K: Ord {
29    type Key = &'a K;
30    type Val = &'a V;
31}
32
33#[cfg(feature = "range")]
34impl<'a, K, V> OrderedMapIterator for map::RangeMut<'a, K, V> where K: Ord {
35    type Key = &'a K;
36    type Val = &'a mut V;
37}
38
39impl<T> OrderedSetIterator for set::IntoIter<T> where T: Ord {}
40
41impl<'a, T> OrderedSetIterator for set::Iter<'a, T> where T: Ord {}
42
43#[cfg(feature = "range")]
44impl<T> OrderedSetIterator for set::IntoRange<T> where T: Ord {}
45
46#[cfg(feature = "range")]
47impl<'a, T> OrderedSetIterator for set::Range<'a, T> where T: Ord {}