Crates.io | enutil |
lib.rs | enutil |
version | 0.1.0 |
source | src |
created_at | 2024-02-06 15:06:16.178855 |
updated_at | 2024-02-06 15:06:16.178855 |
description | General Enum Utility Macros |
homepage | https://github.com/Syndelis/enutil |
repository | https://github.com/Syndelis/enutil |
max_upload_size | |
id | 1129009 |
size | 3,354 |
Enutil includes general utility macros for dealing with enumerators in Rust. The main objective of this crate is to provide macros that reduce boilerplate and/or repetition of (un)commonly seen patterns associated to enumerators in Rust.
Macro | Description |
---|---|
EnumDeref | Implements Deref and DeretMut for a new-type enum based on a common Target |
Simply include it in your Cargo.toml
with the derive
feature.
Via Cargo's CLI:
$ cargo add enutil --features=derive
Manually:
# Cargo.toml
[dependencies]
enutil = { version = "<type latest version here>", features = ["derive"] }
This crate's structure and organization has been largely inspired by that seen in Strum. Checkout that crate for other interesting and useful macros.
It joins the words "Enum" and "Utility", while also sounding like the word "inĂștil", which is portuguese for "useless".