# use io; use Display;
displaythis deliberately does not appear in your public API. You get the same thing as if you had written an implementation of
std::fmt::Displayby hand, and switching from handwritten impls to displaythis or vice versa is not a breaking change.
Types may be enums, structs with named fields, tuple structs, or unit structs.
You should provide
#[display("...")]messages on the struct or each variant of your enum, as shown above in the example.
The messages support a shorthand for interpolating fields from the error.
These shorthands can be used together with any additional format args, which may be arbitrary expressions. For example:
If one of the additional expression arguments needs to refer to a field of the struct or enum, then refer to named fields as
.varand tuple fields as