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
FromStr
if 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::EnumFields
to 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
VariantNames
trait, this is not affected by inflections. Usedelve_derive::EnumHasVariant
to automatically derive this trait. - Modify
Field - A trait that allows the modification of arguments within a tuple or struct variant.
Use
delve_derive::EnumModify
to automatically derive this trait. - Tuple
Count - A trait that returns the number of types within a tuple variant.
Use
delve_derive::EnumTuples
to automatically derive this trait. - Variant
Count - A trait for getting the number of variants in an enum.
Use
delve_derive::EnumVariantCount
to automatically derive this trait. - Variant
Names - A trait for getting the names of the variants in an enum.
Use
delve_derive::EnumVariantNames
to automatically derive this trait.
Derive Macros§
- Enum
Display derive
- Implements
core::fmt::Display
on an enum. - Enum
Fields derive
- Implements
delve::FieldNames
which provides the names of the fields within a struct variant. SeeFieldNames
for an example implementation. - Enum
From Str derive
- Implements
core::str::FromStr
on an enum. - Enum
HasVariant derive
- Implements
delve::HasVariant
which returns whether a given variant name exists in the enum. SeeHasVariant
for an example implementation. - Enum
Modify derive
- Implements
delve::ModifyField
which allows the modification of arguments within a tuple or struct variant. SeeModifyField
for an example implementation. - Enum
ToStr derive
- Implements
From<TheEnum> for &'static str
andFrom<&TheEnum> for &'static str
on an enum. The Ruststd
provides a blanket implementation for the reverse soInto<&'static str> for (&)TheEnum
is also implemented. - Enum
Tuples derive
- Implements
delve::TupleCount
which provides the number of type arguments in a tuple variant. SeeTupleCount
for an example implementation. - Enum
Variant Count derive
- Implements
delve::VariantCount
which provides the number of variants within an enum. SeeVariantCount
for an example implementation. - Enum
Variant Names derive
- Implements
delve::VariantNames
which provides the names of all the variants within an enum. SeeVariantNames
for an example implementation.