pub struct Human {
    pub name: &'static str,
    pub formatter: Formatter,
}
Available on crate features progress and unit-human only.
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
A way to hash our state without using generics. 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
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.