clockwork_tuples/index.rs
1//! Type-level indices for tuple navigation.
2
3/// Marker trait for type-level tuple indices.
4pub trait Index {}
5
6/// Index representing the first element.
7pub struct Here;
8
9/// Index representing a subsequent element.
10pub struct There<T: Index>(std::marker::PhantomData<T>);
11
12impl Index for Here {}
13impl<T: Index> Index for There<T> {}