Tupl
A #![no_std] crate for handling Rust tuples using traits.
This is accomplished via 3 traits:
- Tuple, a marker trait implemented for tuples of arity 0 to 50
- GrowableTuple, implemented for all tuples that can grow
- NonEmptyTuple, implemented for all tuples except the unit type
use ;
let mut tuple = ;
// access the first & last elements of a tuple
*tuple.head_mut = *tuple.head + 1;
*tuple.tail_mut = *tuple.tail + 1;
assert_eq!;
// append an element to a tuple
let tuple = tuple.append;
assert_eq!;
// prepend an element to a tuple
let tuple = tuple.prepend;
assert_eq!;
// truncate the first element of a tuple
let = tuple.truncate_head;
assert_eq!;
// truncate the last element of a tuple
let = tuple.truncate_tail;
assert_eq!;