Expand description
Text formatting utilities.
Structs§
- Arguments
- This structure represents a safely precompiled version of a format string and its arguments. This cannot be generated at runtime because it cannot safely be done, so no constructors are given and the fields are private to prevent modification.
- Debug
List - A struct to help with
fmt::Debug
implementations. - Debug
Map - A struct to help with
fmt::Debug
implementations. - Debug
Set - A struct to help with
fmt::Debug
implementations. - Debug
Struct - A struct to help with
fmt::Debug
implementations. - Debug
Tuple - A struct to help with
fmt::Debug
implementations. - Debug
Value - A
Value
which serializes as a string usingfmt::Debug
. - Error
- The error type which is returned from formatting a message into a stream.
- FmtOption
- A utility to assist with formatting
Option
values. - Format
With - A wrapper type that formats the wrapped value using a provided function.
- Formatter
- Configuration for formatting.
- With
Indent - Wraps a type implementing
core::fmt::Write
so that every newline written to that writer is indented a given amount. - Formatting
Options Experimental - Options for formatting.
- FromFn
Experimental - Implements
fmt::Debug
andfmt::Display
using a function. - NumBuffer
Experimental - A buffer wrapper of which the internal size is based on the maximum number of digits the associated integer can have.
Enums§
- Alignment
- Possible alignments returned by
Formatter::align
- Debug
AsHex Experimental - Specifies whether the
Debug
trait should use lower-/upper-case hexadecimal or normal integers. - Sign
Experimental - The signedness of a
Formatter
(or of aFormattingOptions
).
Traits§
- Binary
b
formatting.- Debug
?
formatting.- Display
- Format trait for an empty format,
{}
. - Lower
Exp e
formatting.- Lower
Hex x
formatting.- Octal
o
formatting.- Pointer
p
formatting.- Upper
Exp E
formatting.- Upper
Hex X
formatting.- Write
- A trait for writing or formatting into Unicode-accepting buffers or streams.
- Write
Ext - Extension trait adding additional methods to types implementing
core::fmt::Write
. - NumBuffer
Trait Experimental - Trait used to describe the maximum number of digits in decimal base of the implemented integer.
Functions§
- alt
- Format the provided value using its
core::fmt::Debug
implementation, with “alternate mode” set - bin
- Format the provided value using its
core::fmt::Binary
implementation. - comma_
delimited - Formats a list of
F
-typed values to the providedwriter
, delimited with commas. - debug
- Wraps a type implementing
fmt::Debug
as aValue
that can be recorded using itsDebug
implementation. - display
- Wraps a type implementing
fmt::Display
as aValue
that can be recorded using itsDisplay
implementation. - hex
- Format the provided value using its
core::fmt::LowerHex
implementation. - opt
- Borrows an
Option
as aFmtOption
that formats the inner value if theOption
isSome
, or emits a customizable string if theOption
isNone
. - ptr
- Format the provided value using its
core::fmt::Pointer
implementation. - write
- Takes an output stream and an
Arguments
struct that can be precompiled with theformat_args!
macro. - from_fn
Experimental - Creates a type whose
fmt::Debug
andfmt::Display
impls are provided with the functionf
.
Type Aliases§
- Result
- The type returned by formatter methods.
Derive Macros§
- Debug
- Derive macro generating an impl of the trait
Debug
.