Module fmt

Source
Expand description

Core implementation for formatting operations.

The central traits are Format, Style, and Write.

Redesign of std::fmt.

Modules§

args
Utilities for assembling a list of variables to format.

Structs§

Binary
A repr for formatting data in binary. Implemented for all integers.
Debug
A programmer-friendly repr for debugging purposes.
Display
A repr for formatting data in a user-friendly style.
Error
The error returned by formatter methods.
Hex
A repr for formatting data in hexadecimal. Implemented for all integers.
Pad
Pad any data with a given character until it reaches a certain width.
Prefix
Prints P before the data.
Pretty
A pretty-printing representation, like Debug but emphasizing readability (e.g. spread over multiple lines).
RestdWrite
A wrapper around a type implementing recore::fmt::Write to make it implement core::fmt::Write.
StdDebug
A wrapper around a type implementing core::fmt::Debug to make it implement recore::fmt::Debug.
StdDisplay
A wrapper around a type implementing core::fmt::Display to make it implement recore::fmt::Display.
StdWrite
A wrapper around a type implementing core::fmt::Write to make it implement recore::fmt::Write.

Enums§

Dir
The direction to place the text in when padding.
Kind
The style of padding.

Traits§

Format
A type that can be formatted in a specific style.
Modifier
A wrapper around a style, providing a modification to that style; for example, Prefix merely prints something before something else.
Style
A specific way to format things, e.g. Display or Hex, for use by a Format.
Write
A trait for writing or formatting into Unicode-accepting buffers or streams.

Type Aliases§

Result
The type returned by formatter methods.