FormattingOptions in std::fmt - Rust (original) (raw)

Struct FormattingOptions

Source

pub struct FormattingOptions { /* private fields */ }

🔬This is a nightly-only experimental API. (formatting_options #118117)

Expand description

Options for formatting.

FormattingOptions is a Formatter without an attached Write trait. It is mainly used to construct Formatter instances.

Source§

Source

🔬This is a nightly-only experimental API. (formatting_options #118117)

Construct a new FormatterBuilder with the supplied Write trait object for output that is equivalent to the {} formatting specifier:

Source

🔬This is a nightly-only experimental API. (formatting_options #118117)

Sets or removes the sign (the + or the - flag).

Source

🔬This is a nightly-only experimental API. (formatting_options #118117)

Sets or unsets the 0 flag.

This is used to indicate for integer formats that the padding to width should both be done with a 0 character as well as be sign-aware

Source

🔬This is a nightly-only experimental API. (formatting_options #118117)

Sets or unsets the # flag.

This flag indicates that the “alternate” form of printing should be used. The alternate forms are:

Source

🔬This is a nightly-only experimental API. (formatting_options #118117)

Sets the fill character.

The optional fill character and alignment is provided normally in conjunction with the width parameter. This indicates that if the value being formatted is smaller than width some extra characters will be printed around it.

Source

🔬This is a nightly-only experimental API. (formatting_options #118117)

Sets or removes the alignment.

The alignment specifies how the value being formatted should be positioned if it is smaller than the width of the formatter.

Source

🔬This is a nightly-only experimental API. (formatting_options #118117)

Sets or removes the width.

This is a parameter for the “minimum width” that the format should take up. If the value’s string does not fill up this many characters, then the padding specified by FormattingOptions::fill/FormattingOptions::alignwill be used to take up the required space.

Source

🔬This is a nightly-only experimental API. (formatting_options #118117)

Sets or removes the precision.

Source

🔬This is a nightly-only experimental API. (formatting_options #118117)

Specifies whether the Debug trait should use lower-/upper-case hexadecimal or normal integers

Source

🔬This is a nightly-only experimental API. (formatting_options #118117)

Returns the current sign (the + or the - flag).

Source

🔬This is a nightly-only experimental API. (formatting_options #118117)

Returns the current 0 flag.

Source

🔬This is a nightly-only experimental API. (formatting_options #118117)

Returns the current # flag.

Source

🔬This is a nightly-only experimental API. (formatting_options #118117)

Returns the current fill character.

Source

🔬This is a nightly-only experimental API. (formatting_options #118117)

Returns the current alignment.

Source

🔬This is a nightly-only experimental API. (formatting_options #118117)

Returns the current width.

Source

🔬This is a nightly-only experimental API. (formatting_options #118117)

Returns the current precision.

Source

🔬This is a nightly-only experimental API. (formatting_options #118117)

Returns the current precision.

Source

🔬This is a nightly-only experimental API. (formatting_options #118117)

§

§

§

§

§

§