All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
NestedTupleChaintrait for chaining two nested tuples together.NestTupleRefandNestTupleMuttraits for converting flat tuples into nested tuples of references and mutable references, respectively.NestedTupleFlattenOptiontrait for flattening nested tuples of double options into nested tuples of options.
TupleReplicate<T>trait for creating tuples by replicating a single value across all positions- Optimized implementation that avoids unnecessary cloning: no
Clonebound for empty/single-element tuples, moves value to last position for multi-element tuples TupleSplit<Idx>trait for splitting tuples at compile-time indices usingtypenumTupleReversetrait for reversing tuple element orderUnitTuplemarker trait for empty tuples()withTupleLen<Len = U0>SingletonTuplemarker trait for single-element tuples(T,)withTupleLen<Len = U1>PairTuplemarker trait for two-element tuples(T1, T2)withTupleLen<Len = U2>TupleTryFrom<T, E>andTupleTryInto<U, E>traits for fallible conversions between tuples where elements implementTryFrom/TryIntoTupleFrom<T>andTupleInto<U>traits for infallible conversions between tuples where elements implementFrom/Into- Support for tuple conversions with proper error handling and type safety
TupleRow<Idx>andTupleRowMut<Idx>traits for indexing rows in tuples of tuplesFirstTupleRowandLastTupleRowconvenience traits for accessing the first and last rows in tuples of tuplesFirstTupleIndexandLastTupleIndexconvenience traits for accessing the first and last elements in tuplesTupleRefMaptrait for applyingTupleRefto each element of a tuple of tuplesTupleMutMaptrait for applyingTupleMutto each element of a tuple of tuplesFlattenNestedTupletrait for converting nested tuples like(A, (B, (C,)))to flat tuples like(A, B, C)NestTupletrait for converting flat tuples like(A, B, C)to nested tuples like(A, (B, (C,)))NestedTupleIndex<Idx>andNestedTupleIndexMut<Idx>traits for compile-time indexing into nested tuples using flat indicesNestedTupleOptiontrait for transposing nested tuples of options into options of nested tuplesIntoNestedTupleOptiontrait for converting nested tuples into nested tuples of optionsNestedTupleOptionWith<H>trait providingfirst_none_with,first_some_with, andtranspose_orhelpers that work with a parallel homogeneous nested tupleHfor result/error mappingNestedTupleReplicate<T>trait for creating nested tuples by replicating a single value across all positionsNestedTuplePopFront,NestedTuplePopBack,NestedTuplePushFront,NestedTuplePushBacktraits for manipulating nested tuples by popping/pushing elements at the front or back while preserving nested structureNestedTuplePopFront,NestedTuplePopBack,NestedTuplePushFront,NestedTuplePushBacktraits for manipulating nested tuples by popping/pushing elements at the front or back while preserving nested structureNestedTupleRow<Idx>trait for accessing a nested row (by value) across nested tuples, keeping the resulting row nested as wellNestedTupleRow<Idx>trait for accessing a nested row (by reference) across nested tuples, keeping the resulting row nested as wellNestedTupleRowMut<Idx>trait for accessing a nested row as mutable referencesNestedTupleRefandNestedTupleMuttraits for retrieving nested tuples of references and nested tuples of mutable references, respectivelyNestTupleMatrixtrait for converting flat tuples of flat tuples (like((A, B), (C, D))) into nested tuples of nested tuples (like((A, (B,)), ((C, (D,)),)))FlattenNestedTupleMatrixtrait for converting nested tuples of nested tuples back into flat tuples of flat tuplesNestedTupleTryFrom<T, E>andNestedTupleTryInto<T, E>traits for fallible, element-wise conversions between nested tuple types usingTryFromconversions and proper error propagationNestedTupleTryFrom<T, E>andNestedTupleTryInto<T, E>traits for fallible, element-wise conversions between nested tuple types usingTryFromconversions and proper error propagationNestedTupleFrom<T>andNestedTupleInto<T>traits for infallible, element-wise conversions usingFromimplementationsNestedTupleOptionFrom<T>andNestedTupleOptionInto<T>traits for infallible, element-wise conversions between nested tuples ofOptions usingFromimplementationsNestedTupleOptionTryFrom<T, E>andNestedTupleOptionTryInto<T, E>traits for fallible, element-wise conversions between nested tuples ofOptions usingTryFromconversions and proper error propagationNestedTupleStartsWith<Other>marker trait for compile-time verification that a nested tuple starts with the same types as another nested tupleNestTupleMatrixtrait for converting flat tuples of flat tuples (like((A, B), (C, D))) into nested tuples of nested tuples (like((A, (B,)), ((C, (D,)),)))FlattenNestedTupleMatrixtrait for converting nested tuples of nested tuples back into flat tuples of flat tuplesNestMatrixElementsandFlattenMatrixElementshelper traits for recursive element processing in matrix operations- Modular organization of flatten-nest crate into separate modules for better code maintainability
- Initial release of tuplities, a collection of utilities for working with tuples in Rust.
- Support for various tuple operations: clone, copy, debug, default, eq, hash, index, insert, len, mut, option, ord, partial_eq, partial_ord, pop_back, pop_front, push_back, push_front, ref, remove.
- Procedural macro for generating trait implementations for tuples up to size 128.
- Feature flags for controlling maximum supported tuple size (default: 8, up to 128).
- No-std compatible.