[][src]Module af_lib::fmt

Formatting utilities.

Macros

Debug

Derive macro generating an impl of the trait Debug.

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.

Counted

Displays a correctly pluralized count of something, for example 3 users.

DebugList

A struct to help with fmt::Debug implementations.

DebugMap

A struct to help with fmt::Debug implementations.

DebugSet

A struct to help with fmt::Debug implementations.

DebugStruct

A struct to help with fmt::Debug implementations.

DebugTuple

A struct to help with fmt::Debug implementations.

Error

The error type which is returned from formatting a message into a stream.

Formatter

Configuration for formatting.

Indented

A wrapper returned from indent() that displays its inner value with custom indentation.

IndentedFormatter

A formatter that automatically indents lines.

Surrounded

A wrapper returned from surround() that displays a value surrounded by a custom prefix and suffix.

Enums

Alignment

Possible alignments returned by Formatter::align

Traits

Binary

b formatting.

Debug

? formatting.

Display

Format trait for an empty format, {}.

LowerExp

e formatting.

LowerHex

x formatting.

Octal

o formatting.

Pointer

p formatting.

UpperExp

E formatting.

UpperHex

X formatting.

Write

A trait for writing or formatting into Unicode-accepting buffers or streams.

Functions

count

Displays a correctly pluralized count of something, for example 3 users.

format

The format function takes an Arguments struct and returns the resulting formatted string.

indent

Wraps the value so that it is displayed with the given initial and hanging indentation.

surround

Wraps a value so that it displays with the given prefix and suffix strings.

write

The write function takes an output stream, and an Arguments struct that can be precompiled with the format_args! macro.

Type Definitions

Result

The type returned by formatter methods.