Expand description
Modules§
- Container
Attributes - Container Attributes
- Field
Attributes - Field Attributes
- Tuple
Attributes - Tuple Attributes
- Variant
Attributes - Variant Attributes
Enums§
- Parse
Error - The error returned in
FromStrif it failed to parse the string into a variant.
Traits§
- Field
Names - A trait that returns the field names from within a struct variant.
Use
delve_derive::EnumFieldsto automatically derive this trait. - HasVariant
- A trait that returns whether a given variant name exists in the enum. Unlike checking if the variant name exists
using the
VariantNamestrait, this is not affected by inflections. Usedelve_derive::EnumHasVariantto automatically derive this trait. - Modify
Field - A trait that allows the modification of arguments within a tuple or struct variant.
Use
delve_derive::EnumModifyto automatically derive this trait. - Tuple
Count - A trait that returns the number of types within a tuple variant.
Use
delve_derive::EnumTuplesto automatically derive this trait. - Variant
Count - A trait for getting the number of variants in an enum.
Use
delve_derive::EnumVariantCountto automatically derive this trait. - Variant
Names - A trait for getting the names of the variants in an enum.
Use
delve_derive::EnumVariantNamesto automatically derive this trait.
Derive Macros§
- Enum
Display derive - Implements
core::fmt::Displayon an enum. - Enum
Fields derive - Implements
delve::FieldNameswhich provides the names of the fields within a struct variant. SeeFieldNamesfor an example implementation. - Enum
From Str derive - Implements
core::str::FromStron an enum. - Enum
HasVariant derive - Implements
delve::HasVariantwhich returns whether a given variant name exists in the enum. SeeHasVariantfor an example implementation. - Enum
Modify derive - Implements
delve::ModifyFieldwhich allows the modification of arguments within a tuple or struct variant. SeeModifyFieldfor an example implementation. - Enum
ToStr derive - Implements
From<TheEnum> for &'static strandFrom<&TheEnum> for &'static stron an enum. The Ruststdprovides a blanket implementation for the reverse soInto<&'static str> for (&)TheEnumis also implemented. - Enum
Tuples derive - Implements
delve::TupleCountwhich provides the number of type arguments in a tuple variant. SeeTupleCountfor an example implementation. - Enum
Variant Count derive - Implements
delve::VariantCountwhich provides the number of variants within an enum. SeeVariantCountfor an example implementation. - Enum
Variant Names derive - Implements
delve::VariantNameswhich provides the names of all the variants within an enum. SeeVariantNamesfor an example implementation.