tuple_split
This crate an extension for the tupleops crate.
tupleops contains many useful features for manipulating tuples and using tuples in generic code. However, it does not support any kind of splitting of tuples. This crate adds that feature.
Examples
Tuples which may be split at index MIDDLE have the trait TupleSplit
,
which, when split, returns TupleSplit::Left
, TupleSplit::Right
.
They can lso be split by specifying either of the sides or both.
let t: = ;
// Splitting tuples by index
let : = ;
assert_eq!;
let : = ;
assert_eq!;
let : = ;
assert_eq!;
let : = ;
assert_eq!;
// Splitting tuples given a left side
let : = ;
assert_eq!;
// Splitting tuples given a right side
let : = ;
assert_eq!;
// Splitting tuples given both sides
let : = ;
assert_eq!;