Expand description
Format forwarding
This module provides wrapper types for each formatting trait other than Debug
which, when Debug
-formatted, forward to the original trait instead of Debug
.
Each wrapper type is a tuple struct so that it can be used as a named
constructor, such as in .map(FmtDisplay)
. In addition, a blanket trait adds
extension methods .fmt_<trait_name>>()
to provide the corresponding wrap.
Any modifiers in the format template string or struct modifier are passed
through to the desired trait implementation unchanged. The only effect of the
forwarding types in this module is to change the ?
template character to one
of the other trait signifiers.
!
Structs§
- Forwards a type’s
Binary
formatting implementation toDebug
. - Forwards a type’s
Display
formatting implementation toDebug
. - Renders each element of a stream into a list.
- Forwards a type’s
LowerExp
formatting implementation toDebug
. - Forwards a type’s
LowerHex
formatting implementation toDebug
. - Forwards a type’s
Octal
formatting implementation toDebug
. - Forwards a type’s
Pointer
formatting implementation toDebug
. - Forwards a type’s
UpperExp
formatting implementation toDebug
. - Forwards a type’s
UpperHex
formatting implementation toDebug
.
Traits§
- Wraps any value with a format-forward to
Debug
.