Crate enumscribe_derive
source ·Expand description
Derive macros for the traits provided by enumscribe, to
help you easily convert your enums to strings and vice-versa.
See the documentation for the enumscribe crate for usage
examples.
Derive Macros
Derives
serde::Deserialize for an enum.Derives
serde::Serialize for an enum.Derives
enumscribe::ScribeCowStr for an enum. This allows the enum to be converted to
a Cow<'static, str> using the scribe() method.Derives
enumscribe::ScribeStaticStr for an enum. This allows the enum to be converted to
a &'static str using the scribe() method.Derives
enumscribe::ScribeString for an enum. This allows the enum to be converted to
a String using the scribe() method.Derives
enumscribe::TryScribeCowStr for an enum. This allows the enum to be converted to
a Option<Cow<'static, str>> using the try_scribe() method.Derives
enumscribe::TryScribeStaticStr for an enum. This allows the enum to be converted to
a Option<&'static str> using the try_scribe() method.Derives
enumscribe::TryScribeString for an enum. This allows the enum to be converted to
a Option<String> using the try_scribe() method.Derives
enumscribe::TryUnscribe for an enum. This allows a &str to be converted to an
Option of the enum using the try_unscribe() associated function.Derives
enumscribe::Unscribe for an enum. This allows a &str to be converted to the
enum using the unscribe() associated function.