| Crates.io | blk_count_macro |
| lib.rs | blk_count_macro |
| version | 0.1.1 |
| created_at | 2023-03-15 22:02:39.787886+00 |
| updated_at | 2023-03-20 16:09:27.180417+00 |
| description | A simple macro for counting a number of comma-separated tokens at compile time |
| homepage | |
| repository | https://github.com/sigurd4/blk_count_macro |
| max_upload_size | |
| id | 811017 |
| size | 3,729 |
A simple macro for counting a number of comma-separated tokens at compile time
Code originates from the little book of rust macros by DanielKeep. I thought i'd add this as a crate to crates.io so it can easily be imported to any project if needed. No std required. I find it very useful for counting the number of elements when implementing traits for tuples within a macro.
Original macro code: https://danielkeep.github.io/tlborm/book/blk-counting.html