Skip to main content

MutablyIterable

Trait MutablyIterable 

Source
pub trait MutablyIterable {
    type Item;
    type Output: Iterator<Item = Self::Item>;

    // Required method
    fn iter_mut(self) -> Self::Output;
}

Required Associated Types§

Source

type Item

Source

type Output: Iterator<Item = Self::Item>

Required Methods§

Source

fn iter_mut(self) -> Self::Output

Returns an iterator over mutable elements in a collection.

use traiter::collections::MutablyIterable;
assert_eq!(MutablyIterable::iter_mut(&mut [0; 0]).next(), None);

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, Element, const LENGTH: usize> MutablyIterable for &'a mut [Element; LENGTH]

Source§

type Item = &'a mut Element

Source§

type Output = IterMut<'a, Element>

Source§

fn iter_mut(self) -> Self::Output

Source§

impl<'a, Element> MutablyIterable for &'a mut Vec<Element>

Source§

type Item = &'a mut Element

Source§

type Output = IterMut<'a, Element>

Source§

fn iter_mut(self) -> Self::Output

Source§

impl<'a, Element> MutablyIterable for &'a mut VecDeque<Element>

Source§

type Item = &'a mut Element

Source§

type Output = IterMut<'a, Element>

Source§

fn iter_mut(self) -> Self::Output

Source§

impl<'a, Element> MutablyIterable for &'a mut [Element]

Source§

type Item = &'a mut Element

Source§

type Output = IterMut<'a, Element>

Source§

fn iter_mut(self) -> Self::Output

Source§

impl<'a, Key, Value, State> MutablyIterable for &'a mut HashMap<Key, Value, State>

Source§

type Item = (&'a Key, &'a mut Value)

Source§

type Output = IterMut<'a, Key, Value>

Source§

fn iter_mut(self) -> Self::Output

Implementors§