const-array-attrs

Crates.ioconst-array-attrs
lib.rsconst-array-attrs
version0.0.3
sourcesrc
created_at2022-03-01 13:57:01.800125
updated_at2022-03-13 05:56:46.989938
descriptionAttribute macros for const array.
homepagehttps://gitlab.com/fton/const-array-attrs
repositoryhttps://gitlab.com/fton/const-array-attrs
max_upload_size
id541547
size16,845
(fton)

documentation

README

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.

Commit count: 13

cargo fmt