Expand description
A library for writing custom formats for types, or for adding handling
of precision, width, fill and alignment to non-numeric types that
implement Display.
Structs§
- Default
NonNumeric - See
default_non_numeric(). - Displayable
- A wrapper around a
CustomDisplayand a value that implementsDisplayby callingCustomDisplay::fmt()with the value, automatically truncates the result ofCustomDisplay::fmt()based on precision ifCustomDisplay::precision_behavior()returnsAutoTruncate, and handles width, fill and alignment ifCustomDisplay::auto_width_fill_alignment()returnstrue.
Enums§
- Precision
Behavior - The behavior of a
Displayablewhen a precision is set.
Traits§
- Custom
Display - A custom format, roughly equivalent to
Displayexcept that it is not restricted by coherence.
Functions§
- default_
non_ numeric - Returns a
CustomDisplaythat provides handling of precision, width, fill and alignment in the way specified bystd::fmtfor non-numeric types. - display_
non_ numeric - Returns a wrapper around the given value that handles precision, width,
fill and alignment in the way specified by
std::fmtfor non-numeric types.
Type Aliases§
- Borrowed
Displayable - A
Displayablethat borrows itsCustomDisplay. - Owned
Displayable - A
Displayablethat owns itsCustomDisplay.