ref_wrapper 0.1.1

Wrapper of dynamically borrowed data.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Provider of [`RefIterMut`].

use crate::RefWrapMut;
use std::ops::DerefMut;

/// Iterator version of [`RefWrapMut`].
pub type RefIterMut<'a, T> = RefWrapMut<'a, dyn Iterator<Item = T>>;

impl<'a, T> Iterator for RefIterMut<'a, T>
where
    T: 'a,
{
    type Item = T;

    fn next(&mut self) -> Option<Self::Item> {
        self.deref_mut().next()
    }
}