Struct IterMut
struct IterMut<'a, T: 'a> { ... }
A mutable iterator over the elements of a VecDeque.
This struct is created by the iter_mut method on super::VecDeque. See its
documentation for more.
Implementations
impl<'a, T> IterMut<'a, T>
fn into_slices(self: Self) -> (&'a mut [T], &'a mut [T])Views the underlying data as a pair of subslices of the original data.
The slices contain, in order, the contents of the deque not yet yielded by the iterator.
To avoid creating
&mutreferences that alias, this is forced to consume the iterator.Examples
use VecDeque; let mut deque = new; deque.push_back; deque.push_back; deque.push_back; deque.push_front; deque.push_front; deque.push_front; let mut iter = deque.iter_mut; iter.next; iter.next_back; let slices = iter.into_slices; slices.0 = 42; slices.1 = 24; assert_eq!;fn as_slices(self: &Self) -> (&[T], &[T])Views the underlying data as a pair of subslices of the original data.
The slices contain, in order, the contents of the deque not yet yielded by the iterator.
To avoid creating
&mut [T]references that alias, the returned slices borrow their lifetimes from the iterator the method is applied on.Examples
use VecDeque; let mut deque = new; deque.push_back; deque.push_back; deque.push_back; deque.push_front; deque.push_front; deque.push_front; let mut iter = deque.iter_mut; iter.next; iter.next_back; assert_eq!;fn as_mut_slices(self: &mut Self) -> (&mut [T], &mut [T])Views the underlying data as a pair of subslices of the original data.
The slices contain, in order, the contents of the deque not yet yielded by the iterator.
To avoid creating
&mut [T]references that alias, the returned slices borrow their lifetimes from the iterator the method is applied on.Examples
use VecDeque; let mut deque = new; deque.push_back; deque.push_back; deque.push_back; deque.push_front; deque.push_front; deque.push_front; let mut iter = deque.iter_mut; iter.next; iter.next_back; iter.as_mut_slices.0 = 42; iter.as_mut_slices.1 = 24; assert_eq!;
impl<'a, T> DoubleEndedIterator for IterMut<'a, T>
fn next_back(self: &mut Self) -> Option<&'a mut T>fn advance_back_by(self: &mut Self, n: usize) -> Result<(), NonZero<usize>>fn rfold<Acc, F>(self: Self, accum: Acc, f: F) -> Acc where F: FnMut(Acc, <Self as >::Item) -> Accfn try_rfold<B, F, R>(self: &mut Self, init: B, f: F) -> R where F: FnMut(B, <Self as >::Item) -> R, R: Try<Output = B>
impl<'a, T> Freeze for IterMut<'a, T>
impl<'a, T> Iterator for IterMut<'a, T>
fn next(self: &mut Self) -> Option<&'a mut T>fn advance_by(self: &mut Self, n: usize) -> Result<(), NonZero<usize>>fn size_hint(self: &Self) -> (usize, Option<usize>)fn fold<Acc, F>(self: Self, accum: Acc, f: F) -> Acc where F: FnMut(Acc, <Self as >::Item) -> Accfn try_fold<B, F, R>(self: &mut Self, init: B, f: F) -> R where F: FnMut(B, <Self as >::Item) -> R, R: Try<Output = B>fn last(self: Self) -> Option<&'a mut T>
impl<'a, T> RefUnwindSafe for IterMut<'a, T>
impl<'a, T> Send for IterMut<'a, T>
impl<'a, T> Sync for IterMut<'a, T>
impl<'a, T> Unpin for IterMut<'a, T>
impl<'a, T> UnsafeUnpin for IterMut<'a, T>
impl<'a, T> UnwindSafe for IterMut<'a, T>
impl<I> IntoIterator for IterMut<'a, T>
fn into_iter(self: Self) -> I
impl<T> Any for IterMut<'a, T>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for IterMut<'a, T>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for IterMut<'a, T>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> Default for IterMut<'_, T>
fn default() -> SelfCreates an empty
vec_deque::IterMut.# use vec_deque; let iter: IterMut = Defaultdefault; assert_eq!;
impl<T> ExactSizeIterator for IterMut<'_, T>
fn len(self: &Self) -> usizefn is_empty(self: &Self) -> bool
impl<T> From for IterMut<'a, T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> FusedIterator for IterMut<'_, T>
impl<T> TrustedLen for IterMut<'_, T>
impl<T, U> Into for IterMut<'a, T>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for IterMut<'a, T>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for IterMut<'a, T>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T: fmt::Debug> Debug for IterMut<'_, T>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result