Struct prodash::unit::human::Human[][src]

pub struct Human {
    pub name: &'static str,
    pub formatter: Formatter,
}
Expand description

A helper for formatting numbers in a format easily read by humans in renderers, as in 2.54 million objects

Fields

name: &'static str

The name of the represented unit, like ‘items’ or ‘objects’.

formatter: Formatter

The formatter to format the actual numbers.

Implementations

A convenience method to create a new new instance and its formatter and name fields.

Trait Implementations

Formats the value using the given formatter. Read more

Display the absolute value representing the current progress of an operation and write it to w. Read more

Emit the upper_bound to w. Read more

Emit the unit of value to w. Read more

Emit a token to separate two values. Read more

Emit percentage to w.

Emit the throughput of an operation to w.

Given a timespan, return a fraction of the timespan based on the given unit, i.e. (possible fraction, unit).

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.