Crates.io | nutype-enum |
lib.rs | nutype-enum |
version | 0.1.5 |
created_at | 2025-02-09 19:33:27.831024+00 |
updated_at | 2025-05-17 13:32:07.728519+00 |
description | Helper macro to create a nutype that behaves like an enum. |
homepage | |
repository | https://github.com/scufflecloud/scuffle |
max_upload_size | |
id | 1549225 |
size | 17,620 |
[!WARNING]
This crate is under active development and may not be stable.
The crate provides a macro to create a new enum type with a single field.
See the changelog for a full release history.
docs
— Enables changelog and documentation of feature flagsThis is useful when you have a value and you want to have enum like behavior and have a catch all case for all other values.
use nutype_enum::nutype_enum;
nutype_enum! {
pub enum AacPacketType(u8) {
SeqHdr = 0x0,
Raw = 0x1,
}
}
This project is licensed under the MIT or Apache-2.0 license. You can choose between one of them if you use this work.
SPDX-License-Identifier: MIT OR Apache-2.0