Struct lib::BytesConfig[][src]

pub struct BytesConfig { /* fields omitted */ }
Expand description

This struct captures the preferences for display of bytes and creates instances of Bytes struct that contain a reference to the preferences that they must use for display. If the preferences are changed, all Bytes that the BytesConfig instanciated adopt immediately the change. Config wrapped in Mutex makes the implementation threadsafe.

Implementations

Specify preferences for the creation of the BytesConfig struct.

Specify the base used for the display of bytes: Gabyte = 1000 bytes or bibyte = 1024 bytes

Specify whether the display of values is aligned or not

Specify how many decimals to display

Creates an instance of Bytes that stores a reference to the BytesConfig instance that created it to obtain preferences from it

Trait Implementations

By default, capacities are displayed in Bibytes (powers of 1000), precision is set to 2 decimals and the display of values is not aligned

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.