[no description]
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -5,7 +5,9 @@ //! //! start with [`Tupl`]. mod implementations; +mod iterator; mod picks; +pub use iterator::IteratorOfTuples; /// Reverse a tuple. pub trait Reverse: Tupl { type Reversed: Tupl; @@ -77,11 +79,20 @@ pub trait Pick<const N: usize>: Tupl { type L: Tupl; /// self[N + 1..] type R: Tupl; + /// self::L + Self::R + type Delete: Tupl; + /// without Self::At + fn delete(l: Self::L, r: Self::R) -> Self::Delete; /// reconstruct fn repick(l: Self::L, at: Self::At, r: Self::R) -> Self; /// deconstruct fn depict(self) -> (Self::L, Self::At, Self::R); } + +pub trait RePick<const N: usize, T>: Pick<N> + Sized { + type New: Tupl; + fn unpick(l: Self::L, at: T, r: Self::R) -> Self::New; +} /// Main tuple trait. #[diagnostic::on_unimplemented( label = "this is not a tuple, or it is too big a tuple (>26 elements)" |