Skip to main content

string_error

Macro string_error 

Source
macro_rules! string_error {
    ( $type:ident $(,)? ) => { ... };
    ( $type:ident, $display_prefix:literal $(,)? ) => { ... };
}
Expand description

Define a String error type.

It’s a trivial Option newtype with a new(ToString) constructor.

The first argument is the type name. The second optional argument is a prefix for the Display message.