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
- Host: GitHub
- URL: https://github.com/abiriadev/tup
- Owner: abiriadev
- Created: 2023-10-22T19:12:04.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-22T19:12:08.000Z (over 2 years ago)
- Last Synced: 2025-03-10T13:19:02.591Z (about 1 year ago)
- Topics: procedural-macros, rust-macros, tuples
- Language: Rust
- Homepage:
- Size: 5.86 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)) {
// ...
}
```