Struct IterMut

#[must_use = "iterators are lazy and do nothing unless consumed"]
pub struct IterMut<'a, T: 'a> { pub(in ::collections::linked_list) head: Option<NonNull<Node<T>>>, pub(in ::collections::linked_list) tail: Option<NonNull<Node<T>>>, pub(in ::collections::linked_list) len: usize, pub(in ::collections::linked_list) marker: PhantomData<&'a mut Node<T>> }

A mutable iterator over the elements of a LinkedList.

This struct is created by [LinkedList::iter_mut()]. See its documentation for more.

Fields

head: Option<NonNull<Node<T>>>
tail: Option<NonNull<Node<T>>>
len: usize
marker: PhantomData<&'a mut Node<T>>

Trait Implementations

impl<'a, T> DoubleEndedIterator for IterMut<'a, T>

fn next_back(&mut self) -> Option<&'a mut T>

impl<'a, T> Iterator for IterMut<'a, T>

type Item = &'a mut T;
fn next(&mut self) -> Option<&'a mut T>
fn size_hint(&self) -> (usize, Option<usize>)
fn last(self) -> Option<&'a mut T>

impl<T> Default for IterMut<'_, T>

fn default() -> Self

impl<T> ExactSizeIterator for IterMut<'_, T>

impl<T> FusedIterator for IterMut<'_, T>

impl<T> TrustedLen for IterMut<'_, T>

impl<T: Debug> Debug for IterMut<'_, T>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl<T: Send> Send for IterMut<'_, T>

impl<T: Sync> Sync for IterMut<'_, T>

Auto Trait Implementations

impl<'a, T> !UnwindSafe for IterMut<'a, T>

impl<'a, T> Freeze for IterMut<'a, T> where Option<NonNull<Node<T>>>: Freeze + Freeze, PhantomData<&'a mut Node<T>>: Freeze,

impl<'a, T> RefUnwindSafe for IterMut<'a, T> where Option<NonNull<Node<T>>>: RefUnwindSafe + RefUnwindSafe, PhantomData<&'a mut Node<T>>: RefUnwindSafe,

impl<'a, T> Unpin for IterMut<'a, T> where Option<NonNull<Node<T>>>: Unpin + Unpin, PhantomData<&'a mut Node<T>>: Unpin,

impl<'a, T> UnsafeUnpin for IterMut<'a, T> where Option<NonNull<Node<T>>>: UnsafeUnpin + UnsafeUnpin, PhantomData<&'a mut Node<T>>: UnsafeUnpin,

Blanket Implementations

impl<I> IntoIterator for IterMut<'a, T> where I: Iterator,

type Item = <I as Iterator>::Item;
type IntoIter = I;
fn into_iter(self) -> I

impl<T> Any for IterMut<'a, T> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for IterMut<'a, T> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for IterMut<'a, T> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for IterMut<'a, T>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> SizeHint for IterMut<'a, T> where T: ?Sized,

fn lower_bound(&self) -> usize
fn upper_bound(&self) -> Option<usize>

impl<T> SizedTypeProperties for IterMut<'a, T>

impl<T, U> Into<U> for IterMut<'a, T> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for IterMut<'a, T> where U: Into<T>,

type Error = Infallible;
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto<U> for IterMut<'a, T> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>