tuple-arity
A simple crate for getting the arity (number of elements) of tuple types with 0 to 12 elements.
How to use
You can use the tuple_arity()
function to get the arity of an existing tuple value.
use *;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
You can also use the Arity
trait to get the arity of a tuple type directly:
use Arity;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;