macro_rules! lit_str {
($struct_name:ident, $val:expr) => { ... };
}Expand description
Creates a type that represents a specific string literal.
The generated type:
- Has a
VALUEconstant with the string - Implements
FromStr(only accepts the exact string) - Implements
Serialize/Deserialize(as the string) - Implements
Display(outputs the string)