Trait pfmt::Fmt

source ·
pub trait Fmt {
    fn format(
        &self,
        full_name: &[String],
        name: &[String],
        args: &[String],
        flags: &[char],
        options: &HashMap<String, String>
    ) -> Result<String, SingleFmtError>; }
Expand description

A unit of formatting.

Required Methods

Perform the formatting of a single placeholder. Placeholder’s full name, name segments of child format units, arguments, flags and options will be passed to this method.

You should not use this method directly, use format on FormatTable instead.

Implementations on Foreign Types

This instance is aware of the following flags:

  • y, which changes the output from true/false to yes/no;
  • Y, which changes the output to Y/N.

Common options are recognized.

This instance has no special flags.

Common options are recognized.

This instance is aware of the following flags:

  • +, which forces display of the sign;
  • e, which changes the output to the scientific, or exponential, notation.

Common options are recognized. Common numeric options are also recognized.

This instance is aware of the following flags:

  • +, which forces display of the sign;
  • e, which changes the output to scientific format.

Common options are recognized. Common numeric options are also recognized.

This instance is aware of the following flags:

  • +, which forces display of the sign;
  • b, which makes the output binary;
  • o, which makes the output octal;
  • p, which in combination with ‘b’, ‘o’ or ‘x’ adds a base prefix to the output.
  • x, which makes output hexadecimal;

Common and common numeric options are recognized.

This instance is aware of the following flags:

  • +, which forces display of the sign;
  • b, which makes the output binary;
  • o, which makes the output octal;
  • p, which in combination with ‘b’, ‘o’ or ‘x’ adds a base prefix to the output.
  • x, which makes output hexadecimal;

Common and common numeric options are recognized.

This instance is aware of the following flags:

  • +, which forces display of the sign;
  • b, which makes the output binary;
  • o, which makes the output octal;
  • p, which in combination with ‘b’, ‘o’ or ‘x’ adds a base prefix to the output.
  • x, which makes output hexadecimal;

Common and common numeric options are recognized.

This instance is aware of the following flags:

  • +, which forces display of the sign;
  • b, which makes the output binary;
  • o, which makes the output octal;
  • p, which in combination with ‘b’, ‘o’ or ‘x’ adds a base prefix to the output.
  • x, which makes output hexadecimal;

Common and common numeric options are recognized.

This instance is aware of the following flags:

  • +, which forces display of the sign;
  • b, which makes the output binary;
  • o, which makes the output octal;
  • p, which in combination with ‘b’, ‘o’ or ‘x’ adds a base prefix to the output.
  • x, which makes output hexadecimal;

Common and common numeric options are recognized.

This instance is aware of the following flags:

  • +, which forces display of the sign;
  • b, which makes the output binary;
  • o, which makes the output octal;
  • p, which in combination with ‘b’, ‘o’ or ‘x’ adds a base prefix to the output.
  • x, which makes output hexadecimal;

Common and common numeric options are recognized.

This instance has no special flags.

Common options are recognized.

This instance has no special flags.

Common options are recognized.

This instance is aware of the following flags:

  • +, which add a leading plus sign;
  • b, which makes the output binary;
  • o, which makes the output octal;
  • p, which in combination with ‘b’, ‘o’ or ‘x’ adds a base prefix to the output.
  • x, which makes the output hexadecimal.

Common and common numeric options are recognized.

This instance is aware of the following flags:

  • +, which add a leading plus sign;
  • b, which makes the output binary;
  • o, which makes the output octal;
  • p, which in combination with ‘b’, ‘o’ or ‘x’ adds a base prefix to the output.
  • x, which makes the output hexadecimal.

Common and common numeric options are recognized.

This instance is aware of the following flags:

  • +, which add a leading plus sign;
  • b, which makes the output binary;
  • o, which makes the output octal;
  • p, which in combination with ‘b’, ‘o’ or ‘x’ adds a base prefix to the output.
  • x, which makes the output hexadecimal.

Common and common numeric options are recognized.

This instance is aware of the following flags:

  • +, which add a leading plus sign;
  • b, which makes the output binary;
  • o, which makes the output octal;
  • p, which in combination with ‘b’, ‘o’ or ‘x’ adds a base prefix to the output.
  • x, which makes the output hexadecimal.

Common and common numeric options are recognized.

This instance is aware of the following flags:

  • +, which add a leading plus sign;
  • b, which makes the output binary;
  • o, which makes the output octal;
  • p, which in combination with ‘b’, ‘o’ or ‘x’ adds a base prefix to the output.
  • x, which makes the output hexadecimal.

Common and common numeric options are recognized.

This instance is aware of the following flags:

  • +, which add a leading plus sign;
  • b, which makes the output binary;
  • o, which makes the output octal;
  • p, which in combination with ‘b’, ‘o’ or ‘x’ adds a base prefix to the output.
  • x, which makes the output hexadecimal.

Common and common numeric options are recognized.

Implementors