Get the number of elements in a tuple.
Add it to your dependencies:
toml
[dependencies]
tuple_len = "2.0"
```rust // The macro way, compute at compilation time asserteq!(tuplelen::tuple_len!(("hello", 5, 'c')), 3);
// The trait way use tuplelen::TupleLen; asserteq!(().len(), 0);
// The function way let tuple = (1,); asserteq!(tuplelen::len(&tuple), 1); ```