pub trait FirstTupleRow: TupleLen {
type FirstRowType: TupleRef + TupleLen<Len = <Self as TupleLen>::Len>;
// Required method
fn first_tuple_row(&self) -> <Self::FirstRowType as TupleRef>::Ref<'_>;
}Expand description
A convenience trait for accessing the first row (index 0) in tuples of tuples.
This trait is automatically implemented for any tuple of tuples where each inner tuple implements TupleRefFront.
§Examples
use tuplities_row::FirstTupleRow;
let matrix = ((1, 2), (3, 4), (5, 6));
let first_row = matrix.first_tuple_row();
assert_eq!(first_row, (&1, &3, &5));Part of the tuplities crate.
Required Associated Types§
Required Methods§
Sourcefn first_tuple_row(&self) -> <Self::FirstRowType as TupleRef>::Ref<'_>
fn first_tuple_row(&self) -> <Self::FirstRowType as TupleRef>::Ref<'_>
Returns a tuple of references to the first element in each inner tuple.