Trait tupleops::TupleLength [−][src]
pub trait TupleLength {
const LENGTH: usize;
}
This is supported on crate feature
length
only.Expand description
A tuple with a known length.
use tupleops::TupleLength;
assert_eq!(0, <() as TupleLength>::LENGTH);
assert_eq!(1, <(u8,) as TupleLength>::LENGTH);
assert_eq!(2, <(u8, u16) as TupleLength>::LENGTH);
assert_eq!(3, <(u8, u16, u32) as TupleLength>::LENGTH);
See also: length().