This modules show an example of code generated by the macro. IT MUST NOT BE USED OUTSIDE THIS CRATE.
This is the basic error structure. You can see that
has been populated in a variety of ways. All
ErrorKinds get a
Msg variant for basic errors. When strings are converted to
ErrorKinds they become
ErrorKind::Msg. The "links" defined in
the macro are expanded to the
Inner variant, and the
"foreign links" to the
Both types come with a variety of
From conversions as well:
Error can be created from
foreign_links error types.
can be created from the corresponding
ErrorKinds of the link
types, as well as from
From::from are used heavily to massage types into
the right shape. Which one to use in any specific case depends on
the influence of type inference, but there are some patterns that
Another code generated by the macro.
The Error type.
The kind of an error.
Additionnal methods for
Convenient wrapper around