Crates.io | delve |
lib.rs | delve |
version | 0.3.0 |
source | src |
created_at | 2023-01-19 20:56:18.17187 |
updated_at | 2023-01-20 11:49:10.795509 |
description | Provides a number of macros that make working with enums and strings more convenient. |
homepage | https://github.com/DexterHill0/delve |
repository | https://github.com/DexterHill0/delve |
max_upload_size | |
id | 762927 |
size | 26,113 |
Delve provides a number of macros that make working with enums and strings more convenient.
delve
can be included using:
[dependencies]
delve = { version = "0.3.0", features = ["derive"] }
Macro | Description |
---|---|
EnumVariantCount | Adds an associated VARIANT_COUNT for getting the number of variants in an enum. |
EnumVariantNames | Adds an associated VARIANT_NAMES for getting the names of the variants in an enum. |
EnumHasVariant | Returns whether a given variant name exists in the enum. |
EnumDisplay | Converts an enum variant to a string. |
EnumFromStr | Converts a string to an enum variant |
EnumFields | Returns the field names from within a struct variant. |
EnumTuples | Returns the number of types within a tuple variant. |
EnumModify | Allows the modification of arguments within a tuple or struct variant. |
EnumToStr | Converts an enum variant to a string. |