pub trait UnitTuple: TupleLen<Len = U0> { }Expand description
A marker trait for empty tuples (size 0).
This trait is implemented for the unit type () and can be used
for type-level programming to identify empty tuples.
§Examples
use tuplities_len::{UnitTuple, TupleLen};
use typenum::U0;
fn is_empty<T: UnitTuple>(_tuple: T) {
// This function only accepts empty tuples
}
is_empty(()); // This works
// is_empty((1,)); // This would not compilePart of the tuplities crate.