Skip to main content

LruIteratorSupport

Trait LruIteratorSupport 

Source
pub trait LruIteratorSupport<'a, K: 'a, V: 'a> {
    type Iter: Iterator<Item = (&'a K, &'a V)>;
    type IterMut: Iterator<Item = (&'a K, &'a mut V)>;

    // Required methods
    fn iter(&'a self) -> Self::Iter;
    fn iter_mut(&'a mut self) -> Self::IterMut;
}
Expand description

Helper trait for backends that support iteration.

Required Associated Types§

Source

type Iter: Iterator<Item = (&'a K, &'a V)>

The associated specific type.

Source

type IterMut: Iterator<Item = (&'a K, &'a mut V)>

The associated specific type.

Required Methods§

Source

fn iter(&'a self) -> Self::Iter

Returns an iterator over the elements.

Source

fn iter_mut(&'a mut self) -> Self::IterMut

Returns an iterator over the elements.

Implementations on Foreign Types§

Source§

impl<'a, K: Hash + Eq + Ord + 'a, V: 'a> LruIteratorSupport<'a, K, V> for LruCache<K, V>

Source§

type Iter = Iter<'a, K, V>

Source§

type IterMut = IterMut<'a, K, V>

Source§

fn iter(&'a self) -> Self::Iter

Source§

fn iter_mut(&'a mut self) -> Self::IterMut

Implementors§

Source§

impl<'a, K, V, const N: usize, I, S> LruIteratorSupport<'a, K, V> for SmallLruCache<K, V, N, I, S>
where K: Hash + Eq + Ord + Clone + 'a, V: 'a, I: IndexType, S: AnyLruCache<K, V> + for<'b> LruIteratorSupport<'b, K, V>,

Source§

type Iter = Iter<'a, K, V, N, I, S>

Source§

type IterMut = IterMut<'a, K, V, N, I, S>

Source§

impl<'a, K, V, const N: usize, I: IndexType> LruIteratorSupport<'a, K, V> for HeaplessBTreeLruCache<K, V, N, I>
where K: Hash + Eq + Ord + Clone + 'a, V: 'a,

Source§

type Iter = Iter<'a, K, V, N, I>

Source§

type IterMut = IterMut<'a, K, V, N, I>

Source§

impl<'a, K, V, const N: usize, I: IndexType> LruIteratorSupport<'a, K, V> for HeaplessLinearLruCache<K, V, N, I>
where K: Hash + Eq + Ord + Clone + 'a, V: 'a,

Source§

type Iter = Iter<'a, K, V, N, I>

Source§

type IterMut = IterMut<'a, K, V, N, I>

Source§

impl<'a, K, V, const N: usize, I: IndexType> LruIteratorSupport<'a, K, V> for HeaplessLruCache<K, V, N, I>
where K: Hash + Eq + Ord + Clone + 'a, V: 'a,

Source§

type Iter = Iter<'a, K, V, N, I>

Source§

type IterMut = IterMut<'a, K, V, N, I>