Expand description
§Structural operations for tuples
This crate implements splitting and joining tuples.
The traits are implemented for tuples from zero len (ie, () unit) to 16.
(More with with the tuple_24 and tuple_32 features enabled.)
They are implemented for both tuples by value and reference, which either consume or borrow their inputs respectively.
An example of TupleJoin by value:
use tuplestructops::TupleJoin;
let out = (1,'a',"b").join((1., 2.));
println!("out {out:?}");TupleSplit does the converse. It relies on pattern matching to determine
the split.
use tuplestructops::TupleSplit;
let out: (_, (_,_,_)) = (1,2,3,4,5).split();
println!("out {out:?}");Traits§
- Tuple
Join - Implement
joinfor tuples. - Tuple
Split - Split a tuple into left and right portions.
Type Aliases§
- Tuple
Join Output - Resulting type of joining tuples
LandR. This is useful for referencing it in other type contexts. For example: