wyz

Module fmt

Source
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 to Debug.
  • Forwards a type’s Display formatting implementation to Debug.
  • Renders each element of a stream into a list.
  • Forwards a type’s LowerExp formatting implementation to Debug.
  • Forwards a type’s LowerHex formatting implementation to Debug.
  • Forwards a type’s Octal formatting implementation to Debug.
  • Forwards a type’s Pointer formatting implementation to Debug.
  • Forwards a type’s UpperExp formatting implementation to Debug.
  • Forwards a type’s UpperHex formatting implementation to Debug.

Traits§

  • Wraps any value with a format-forward to Debug.