#array #const #attributes #hobby #util-lib #sorting #macro

macro const-array-attrs

Attribute macros for const array

3 releases

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

#6 in #util-lib

Download history 9/week @ 2024-02-19 28/week @ 2024-02-26 10/week @ 2024-03-04 10/week @ 2024-03-11 5/week @ 2024-03-18 14/week @ 2024-03-25 64/week @ 2024-04-01 10/week @ 2024-04-08 30/week @ 2024-04-15 19/week @ 2024-04-22

126 downloads per month
Used in 2 crates

MIT/Apache

11KB
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

~1.5MB
~34K SLoC