pub trait IterRefMut: IntoIterator {
type IntoIterRefMut<'a>: Iterator<Item = &'a mut Self::Item>
where Self: 'a;
// Required method
fn iter_mut<'a>(&'a mut self) -> Self::IntoIterRefMut<'a>;
}Required Associated Types§
type IntoIterRefMut<'a>: Iterator<Item = &'a mut Self::Item> where Self: 'a
Required Methods§
Sourcefn iter_mut<'a>(&'a mut self) -> Self::IntoIterRefMut<'a>
fn iter_mut<'a>(&'a mut self) -> Self::IntoIterRefMut<'a>
Iterates over the items as mutable references.
A ‘reference’ is a type that points to a different spot in memory where the actual data is. Being ‘mutable’ means that the reference can change the underlying data.
If you don’t need to change the underlying data then prefer using ‘iter()’
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.