Crate enumscribe_derive[][src]

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

EnumDeserialize

Derives serde::Deserialize for an enum.

EnumSerialize

Derives serde::Serialize for an enum.

ScribeCowStr

Derives enumscribe::ScribeCowStr for an enum. This allows the enum to be converted to a Cow<'static, str> using the scribe() method.

ScribeStaticStr

Derives enumscribe::ScribeStaticStr for an enum. This allows the enum to be converted to a &'static str using the scribe() method.

ScribeString

Derives enumscribe::ScribeString for an enum. This allows the enum to be converted to a String using the scribe() method.

TryScribeCowStr

Derives enumscribe::TryScribeCowStr for an enum. This allows the enum to be converted to a Option<Cow<'static, str>> using the try_scribe() method.

TryScribeStaticStr

Derives enumscribe::TryScribeStaticStr for an enum. This allows the enum to be converted to a Option<&'static str> using the try_scribe() method.

TryScribeString

Derives enumscribe::TryScribeString for an enum. This allows the enum to be converted to a Option<String> using the try_scribe() method.

TryUnscribe

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.

Unscribe

Derives enumscribe::Unscribe for an enum. This allows a &str to be converted to the enum using the unscribe() associated function.