[][src]Module signifix::binary

Formatter of Signifix default notation with binary prefix.

Structs

Signifix

Intermediate implementor type of this module's TryFrom and Display trait implementations. Former tries to convert a given number into this type by determining the appropriate binary prefix, the normalized significand, and the decimal mark position while latter uses this type's fields to format the number as a string of four significant figures inclusive the binary prefix symbol.

Enums

Error

An error arising from this module's TryFrom trait implementation for its Signifix type.

Constants

DEF_MAX_LEN

Number of characters in default notation when a sign is prefixed.

DEF_MIN_LEN

Number of characters in default notation when no sign is prefixed.

FACTORS

Binary prefix factors from 1 024 ^ 1 to 1 024 ^ 8 indexed from 1 to 8, or 1 024 ^ 0 indexed at 0.

SYMBOLS

Binary prefix symbols from Some("Ki") to Some("Yi") indexed from 1 to 8, or None indexed at 0.

Type Definitions

Result

The canonical Result type using this module's Error type.