[][src]Module wyz::fmt

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

FmtBinary

Forwards a type’s Binary formatting implementation to Debug.

FmtDisplay

Forwards a type’s Display formatting implementation to Debug.

FmtLowerExp

Forwards a type’s LowerExp formatting implementation to Debug.

FmtLowerHex

Forwards a type’s LowerHex formatting implementation to Debug.

FmtOctal

Forwards a type’s Octal formatting implementation to Debug.

FmtPointer

Forwards a type’s Pointer formatting implementation to Debug.

FmtUpperExp

Forwards a type’s UpperExp formatting implementation to Debug.

FmtUpperHex

Forwards a type’s UpperHex formatting implementation to Debug.

Traits

FmtForward

Wraps any value with a format-forward to Debug.