Skip to content

Latest commit

 

History

History
69 lines (58 loc) · 6.09 KB

File metadata and controls

69 lines (58 loc) · 6.09 KB

Changelog

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.

Unreleased

Added in Unreleased

  • NestedTupleChain trait for chaining two nested tuples together.
  • NestTupleRef and NestTupleMut traits for converting flat tuples into nested tuples of references and mutable references, respectively.
  • NestedTupleFlattenOption trait for flattening nested tuples of double options into nested tuples of options.

[0.1.4] - 2025-12-15

Added in 0.1.4

  • TupleReplicate<T> trait for creating tuples by replicating a single value across all positions
  • Optimized implementation that avoids unnecessary cloning: no Clone bound for empty/single-element tuples, moves value to last position for multi-element tuples
  • TupleSplit<Idx> trait for splitting tuples at compile-time indices using typenum
  • TupleReverse trait for reversing tuple element order
  • UnitTuple marker trait for empty tuples () with TupleLen<Len = U0>
  • SingletonTuple marker trait for single-element tuples (T,) with TupleLen<Len = U1>
  • PairTuple marker trait for two-element tuples (T1, T2) with TupleLen<Len = U2>
  • TupleTryFrom<T, E> and TupleTryInto<U, E> traits for fallible conversions between tuples where elements implement TryFrom/TryInto
  • TupleFrom<T> and TupleInto<U> traits for infallible conversions between tuples where elements implement From/Into
  • Support for tuple conversions with proper error handling and type safety
  • TupleRow<Idx> and TupleRowMut<Idx> traits for indexing rows in tuples of tuples
  • FirstTupleRow and LastTupleRow convenience traits for accessing the first and last rows in tuples of tuples
  • FirstTupleIndex and LastTupleIndex convenience traits for accessing the first and last elements in tuples
  • TupleRefMap trait for applying TupleRef to each element of a tuple of tuples
  • TupleMutMap trait for applying TupleMut to each element of a tuple of tuples
  • FlattenNestedTuple trait for converting nested tuples like (A, (B, (C,))) to flat tuples like (A, B, C)
  • NestTuple trait for converting flat tuples like (A, B, C) to nested tuples like (A, (B, (C,)))
  • NestedTupleIndex<Idx> and NestedTupleIndexMut<Idx> traits for compile-time indexing into nested tuples using flat indices
  • NestedTupleOption trait for transposing nested tuples of options into options of nested tuples
  • IntoNestedTupleOption trait for converting nested tuples into nested tuples of options
  • NestedTupleOptionWith<H> trait providing first_none_with, first_some_with, and transpose_or helpers that work with a parallel homogeneous nested tuple H for result/error mapping
  • NestedTupleReplicate<T> trait for creating nested tuples by replicating a single value across all positions
  • NestedTuplePopFront, NestedTuplePopBack, NestedTuplePushFront, NestedTuplePushBack traits for manipulating nested tuples by popping/pushing elements at the front or back while preserving nested structure
  • NestedTuplePopFront, NestedTuplePopBack, NestedTuplePushFront, NestedTuplePushBack traits for manipulating nested tuples by popping/pushing elements at the front or back while preserving nested structure
  • NestedTupleRow<Idx> trait for accessing a nested row (by value) across nested tuples, keeping the resulting row nested as well
  • NestedTupleRow<Idx> trait for accessing a nested row (by reference) across nested tuples, keeping the resulting row nested as well
  • NestedTupleRowMut<Idx> trait for accessing a nested row as mutable references
  • NestedTupleRef and NestedTupleMut traits for retrieving nested tuples of references and nested tuples of mutable references, respectively
  • NestTupleMatrix trait for converting flat tuples of flat tuples (like ((A, B), (C, D))) into nested tuples of nested tuples (like ((A, (B,)), ((C, (D,)),)))
  • FlattenNestedTupleMatrix trait for converting nested tuples of nested tuples back into flat tuples of flat tuples
  • NestedTupleTryFrom<T, E> and NestedTupleTryInto<T, E> traits for fallible, element-wise conversions between nested tuple types using TryFrom conversions and proper error propagation
  • NestedTupleTryFrom<T, E> and NestedTupleTryInto<T, E> traits for fallible, element-wise conversions between nested tuple types using TryFrom conversions and proper error propagation
  • NestedTupleFrom<T> and NestedTupleInto<T> traits for infallible, element-wise conversions using From implementations
  • NestedTupleOptionFrom<T> and NestedTupleOptionInto<T> traits for infallible, element-wise conversions between nested tuples of Options using From implementations
  • NestedTupleOptionTryFrom<T, E> and NestedTupleOptionTryInto<T, E> traits for fallible, element-wise conversions between nested tuples of Options using TryFrom conversions and proper error propagation
  • NestedTupleStartsWith<Other> marker trait for compile-time verification that a nested tuple starts with the same types as another nested tuple
  • NestTupleMatrix trait for converting flat tuples of flat tuples (like ((A, B), (C, D))) into nested tuples of nested tuples (like ((A, (B,)), ((C, (D,)),)))
  • FlattenNestedTupleMatrix trait for converting nested tuples of nested tuples back into flat tuples of flat tuples
  • NestMatrixElements and FlattenMatrixElements helper traits for recursive element processing in matrix operations
  • Modular organization of flatten-nest crate into separate modules for better code maintainability

[0.1.0] - 2025-12-05

Added in 0.1.0

  • 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.