pub trait TupleMutMap {
type MutMap<'a>
where Self: 'a;
// Required method
fn tuple_mut_map(&mut self) -> Self::MutMap<'_>;
}Expand description
A trait for applying TupleMut to each element of a tuple.
This trait takes a mutable reference to a tuple where each element implements TupleMut and returns
a tuple where each element is the result of calling tuple_mut() on the original elements.
§Examples
use tuplities_mut::TupleMutMap;
let mut matrix = ((1, 2), (3, 4), (5, 6));
let mut_ref_matrix = matrix.tuple_mut_map();
assert_eq!(mut_ref_matrix, ((&mut 1, &mut 2), (&mut 3, &mut 4), (&mut 5, &mut 6)));Part of the tuplities crate.
Required Associated Types§
Required Methods§
Sourcefn tuple_mut_map(&mut self) -> Self::MutMap<'_>
fn tuple_mut_map(&mut self) -> Self::MutMap<'_>
Returns a tuple where each element is a tuple of mutable references to the inner elements.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".