#util-lib #hobby

macro const-array-attrs

Attribute macros for const array

3 releases

Uses new Rust 2021

0.0.3 Mar 13, 2022
0.0.2 Mar 2, 2022
0.0.1 Mar 1, 2022

#821 in Rust patterns

Download history 15/week @ 2022-06-06 6/week @ 2022-06-13 13/week @ 2022-06-20 10/week @ 2022-06-27 10/week @ 2022-07-04 13/week @ 2022-07-11 12/week @ 2022-07-18 17/week @ 2022-07-25 13/week @ 2022-08-01 27/week @ 2022-08-08 10/week @ 2022-08-15 15/week @ 2022-08-22 9/week @ 2022-08-29 25/week @ 2022-09-05 17/week @ 2022-09-12 13/week @ 2022-09-19

65 downloads per month
Used in 2 crates

MIT/Apache

10KB
208 lines

Latest Release pipeline status coverage report

Description

Attribute macros for const array.

Usage

use const_array_attrs::sorted;

#[sorted]
pub const KEYWORDS: [(&'static str, u8); 3] = [
    ("Pa", 1),
    ("N", 2),
    ("ft", 3),
];

let mut it = KEYWORDS.iter();

assert_eq!(it.next(), Some(&("N", 2)));
assert_eq!(it.next(), Some(&("Pa", 1)));
assert_eq!(it.next(), Some(&("ft", 3)));

Project status

This package is in the very early stage.

Dependencies

~235–640KB
~15K SLoC