Available on crate feature
formatting
only.Expand description
Formatting for various types.
Re-exportsยง
pub use self::formattable::Formattable;
Modulesยง
- formattable ๐
- A trait that can be used to format an item from its components.
- iso8601 ๐
- Helpers for implementing formatting for ISO 8601.
Constantsยง
- MONTH_
NAMES ๐ - WEEKDAY_
NAMES ๐
Functionsยง
- fmt_day ๐
- Format the day into the designated output.
- fmt_
hour ๐ - Format the hour into the designated output.
- fmt_
minute ๐ - Format the minute into the designated output.
- fmt_
month ๐ - Format the month into the designated output.
- fmt_
offset_ ๐hour - Format the offset hour into the designated output.
- fmt_
offset_ ๐minute - Format the offset minute into the designated output.
- fmt_
offset_ ๐second - Format the offset second into the designated output.
- fmt_
ordinal ๐ - Format the ordinal into the designated output.
- fmt_
period ๐ - Format the period into the designated output.
- fmt_
second ๐ - Format the second into the designated output.
- fmt_
subsecond ๐ - Format the subsecond into the designated output.
- fmt_
unix_ ๐timestamp - Format the Unix timestamp into the designated output.
- fmt_
week_ ๐number - Format the week number into the designated output.
- fmt_
weekday ๐ - Format the weekday into the designated output.
- fmt_
year ๐ - Format the year into the designated output.
- format_
component ๐ - Format the provided component into the designated output. An
Err
will be returned if the component requires information that it does not provide or if the value cannot be output to the stream. - format_
float ๐ - Write the floating point number to the output, returning the number of bytes written.
- format_
number ๐ - Format a number with the provided padding and width.
- format_
number_ ๐pad_ none - Format a number with no padding.
- format_
number_ ๐pad_ space - Format a number with the provided width and spaces as padding.
- format_
number_ ๐pad_ zero - Format a number with the provided width and zeros as padding.
- write ๐
- Write all bytes to the output, returning the number of bytes written.
- write_
if ๐ - If
pred
is true, write all bytes to the output, returning the number of bytes written. - write_
if_ ๐else - If
pred
is true, writetrue_bytes
to the output. Otherwise, writefalse_bytes
.