Module bstring::bfmt [] [src]

Byte string formatting

This module is analogous to the standard fmt module, but is more limited in scope.

There is only one trait, Display, and formatting flags are not currently supported.

However, bformat! is able to use the result of the standard macro format_args! to produce formatted byte string.

bformat!("foo {}",
    format_args!("{:x}", 255))

Structs

ArgumentV1

Represents a formatted argument.

Arguments

Represents a formatted string and set of arguments.

Error

Represents an error returned from a formatting trait

Formatter

Byte string formatter

ParseError

Represents an error parsing a format string.

Parser

Parses a &bstr format string into a series of Item components.

Enums

Item

Represents a section of a parsed format string.

ParseErrorKind

Represents a kind of error generated while parsing a format string.

Traits

Display

Displays a value using a formatter.

ToBString

Creates a BString from a value.

WriteFmt

Helper trait to support Formatter::write_fmt

Functions

format_args

Formats an Arguments value into a BString.

Type Definitions

Result

The Result type returned from the bfmt formatting trait.