Trait pfmt::Fmt[][src]

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

This trait drives the formatting of a single placeholder. Placeholder's arguments, flags and options are passed to the format method.

Required Methods

Implementations on Foreign Types

impl Fmt for bool
[src]

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 recognised.

impl Fmt for char
[src]

This instance has no special flags. Common options are recognised.

impl Fmt for f32
[src]

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 recognised. Common numeric options are also recognised.

impl Fmt for f64
[src]

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.

impl Fmt for i8
[src]

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.

impl Fmt for i16
[src]

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.

impl Fmt for i32
[src]

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.

impl Fmt for i64
[src]

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.

impl Fmt for i128
[src]

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.

impl Fmt for isize
[src]

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.

impl<'a> Fmt for &'a str
[src]

This instance has no special flags. Common options are recognised.

impl Fmt for String
[src]

This instance has no special flags. Common options are recognised.

impl Fmt for u8
[src]

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 recognised.

impl Fmt for u16
[src]

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 recognised.

impl Fmt for u32
[src]

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 recognised.

impl Fmt for u64
[src]

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 recognised.

impl Fmt for u128
[src]

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 recognised.

impl Fmt for usize
[src]

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 recognised.

Implementors