pub trait TupleSplitIntoLeft<L>: Tuplewhere
L: Tuple,{
type Right: Tuple;
// Required method
const fn split_tuple_into_left(self) -> (L, Self::Right);
}
Expand description
A trait for splitting a tuple up into two parts given a specified left part L
. L
must be a leftmost segment of Self
.
Tuples will be split into parts L
and TupleSplitIntoLeft::Right.
§Example
let t = (1, 1.0, "test");
let (l, r) = tuple_split::split_tuple_into_left::<(u8, f32), _>(t);
assert_eq!(t, tupleops::concat_tuples(l, r));