pub trait TupleRefMap {
type RefMap<'a>
where Self: 'a;
// Required method
fn tuple_ref_map(&self) -> Self::RefMap<'_>;
}Expand description
A trait for applying TupleRef to each element of a tuple.
This trait takes a tuple where each element implements TupleRef and returns
a tuple where each element is the result of calling tuple_ref() on the original elements.
§Examples
use tuplities_ref::TupleRefMap;
let matrix = ((1, 2), (3, 4), (5, 6));
let ref_matrix = matrix.tuple_ref_map();
assert_eq!(ref_matrix, ((&1, &2), (&3, &4), (&5, &6)));Part of the tuplities crate.
Required Associated Types§
Required Methods§
Sourcefn tuple_ref_map(&self) -> Self::RefMap<'_>
fn tuple_ref_map(&self) -> Self::RefMap<'_>
Returns a tuple where each element is a tuple of references to the inner elements.
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.