blk_count_macro

Crates.ioblk_count_macro
lib.rsblk_count_macro
version0.1.1
sourcesrc
created_at2023-03-15 22:02:39.787886
updated_at2023-03-20 16:09:27.180417
descriptionA simple macro for counting a number of comma-separated tokens at compile time
homepage
repositoryhttps://github.com/sigurd4/blk_count_macro
max_upload_size
id811017
size3,729
sigurd4 (sigurd4)

documentation

README

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

Commit count: 5

cargo fmt