An open API service indexing awesome lists of open source software.

https://github.com/abiriadev/tup

Helper macro for rust tuple
https://github.com/abiriadev/tup

procedural-macros rust-macros tuples

Last synced: about 1 year ago
JSON representation

Helper macro for rust tuple

Awesome Lists containing this project

README

          

# `tup!()` macro

Generate a tuple or tuple type by repeating value or type.

```rs
use tup::tup;

// make tuple of length 6 filled with 0
let new_tuple = tup!(0; 6);

// define a function accepting a tuple consisting of four `usize`
fn draw(box: tup!(usize; 4)) {
// ...
}
```