docs.rs failed to build zenum-0.0.0-reserved
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
enumwow
Differences from strum
Creating a second crate allows us to re-think the entire API, and we did:
FromStrDisplayVARIANT_COUNTadds associated constantVARIANT_COUNTVARIANT_NAMESadds associated constantVARIANT_NAMESEnumKind, creates a same enum without any fieldsEnumIter, creates an iterator over the enum's variants (fields areDefaulted)from_discriminantdiscriminantvariant_name, a function of signaturefn(&self) -> &'static strisfor each variant, returnsboolas, get the exact variant as anOptionmap, get the exact variant in a closureunwrapexpect
wowenum
EnumStringrenamed toFromStr- Generics are not supported, due of fundamental language limitations
in Rust's
macro_rules!macros - No traits. The fact that
strumrequires importing its special traits makes the APIs harder to use, and I've yet to see a single library that actually was generic over any ofstrum's traits, so instead we add the respective items as associated constants/functions