tuple
Element wise operations on tuples!
Documentation
This crate allows to generalize operations to tuples using macros. Please look at the Documentation for examples.
Supported Operations so far:
TupleElements
trait (for tuples where all elements have the same type)get
andget_mut
functionsN
(number of elements)
ops
Index
,IndexMut
Clone
,Copy
Add
,AddAssign
Sub
,SubAssign
Mul
,Div
Neg
fmt::Debug
iter
Iterator
Iterate over all elements at once (assuming they implementIterator
). The iterations stops once one or more elements returnNone
.
conv
From
andInto
their tuple equivalent.
- other
rev
: reverse the elementsrot_l
androt_r
: rotate elementssplit
: make two separate tuples out of onejoin
: turn two tuples into one