Skip to main content

Module combinator

Module combinator 

Source

Structs§

If
Conditionally displays a value. If the condition is false, writes nothing.
Or
Chooses between two values based on a condition. If use_fallback is false, displays inner; otherwise displays fallback.
PadLeft
Left-pads formatted output to width characters using fill.
PadRight
Right-pads formatted output to width characters using fill.
Prefix
Prepends a prefix to a value: prefix + inner.
Suffix
Appends a suffix to a value: inner + suffix.
Truncate
Truncates formatted output to at most max_chars Unicode scalar values.
TruncateWith
Truncates with a tail indicator (e.g., “…”).
Wrap
Wraps a value with a prefix and suffix: prefix + inner + suffix.

Traits§

SmartFormat
Extension trait that adds composable formatting combinators to any Display type.