macro_rules! static_gloss_error {
( $type:ident $(,)? ) => { ... };
( $type:ident, $display_prefix:expr $(,)? ) => { ... };
}Expand description
Define an error type with a &'static str representation for Display.
The first argument is the type name. The second optional argument is a prefix for the Display representation.
Implemented as a trivial Option newtype with new(Into<&'static str>) as well as
as_problem(Into<&'static str>) constructors.
Note that the inner string is intended to be only representational. It is not recommended to associate other meanings with it because string comparisons are inefficient.
When the inner value is None (as is constructed by default) it behaves like a tag_error! type.