delve-derive

Crates.iodelve-derive
lib.rsdelve-derive
version0.3.0
sourcesrc
created_at2023-01-19 20:53:09.287646
updated_at2023-01-20 11:48:57.0872
descriptionProvides a number of macros that make working with enums and strings more convenient.
homepagehttps://github.com/DexterHill0/delve
repositoryhttps://github.com/DexterHill0/delve
max_upload_size
id762924
size38,105
Dexter Hill (DexterHill0)

documentation

https://docs.rs/delve

README

Delve

Delve provides a number of macros that make working with enums and strings more convenient.

github crates.io docs.rs

Including Delve

delve can be included using:

[dependencies]
delve = { version = "0.3.0", features = ["derive"] }

Derive Macros

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.
Commit count: 16

cargo fmt