| Crates.io | tuple |
| lib.rs | tuple |
| version | 0.5.2 |
| created_at | 2017-03-18 12:15:19.513726+00 |
| updated_at | 2023-12-11 15:16:24.082669+00 |
| description | Element-wise operations on tuples |
| homepage | https://github.com/s3bk/tuple.git |
| repository | https://github.com/s3bk/tuple.git |
| max_upload_size | |
| id | 9028 |
| size | 44,170 |
Element wise operations on tuples!
This crate allows to generalize operations to tuples using macros. Please look at the Documentation for examples.
impl_num (default) add support for (some) num traitsimpl_serde (default) add support for serialization and deserialization (depends on serde)impl_simd add support for (some) simd-types (depends on stdsimd and is only available on nightly)TupleElements trait (for tuples where all elements have the same type)
get and get_mut functionsN (number of elements)ops
Index,IndexMutClone, CopyAdd, AddAssignSub, SubAssignMul, DivNegfmt::Debugiter
Iterator Iterate over all elements at once (assuming they implement Iterator).
The iterations stops once one or more elements return None.convert
From and Into their tuple equivalent.From and Into their array equivalent.TryFrom sliceMap<T> trait
map: apply a function to each element and return the resulting tuplerev: reverse the elementsrot_l and rot_r: rotate elementssplit: make two separate tuples out of onejoin: turn two tuples into one