Struct signifix::Signifix [] [src]

pub struct Signifix { /* fields omitted */ }

Intermediate implementor type of this crate's TryFrom and Display trait implementations. Former tries to convert a number to this type by automatically choosing the metric unit prefix and appropriately adjusting the floating point precision while latter uses this type's fields to format the number to a string of a fixed number of significant figures and a fixed number of resulting characters. The format parameter {} prefixes negative numbers with a minus sign. The variant {:+} additionally prefixes positive numbers with a plus sign while the variant {:#} uses a whitespace instead to align with negative numbers.

Methods

impl Signifix
[src]

Automatically chosen metric unit prefix ranging from y to Y.

Appropriately adjusted floating point precision ranging from 1 to 3.

Metrically normalized signed significand ranging from ±1.000 to ±999.9.

Trait Implementations

impl Debug for Signifix
[src]

Formats the value using the given formatter.

impl Copy for Signifix
[src]

impl Clone for Signifix
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Signifix
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Signifix
[src]

impl<T> TryFrom<T> for Signifix where T: Into<f64>
[src]

Unstable (try_from)

The type returned in the event of a conversion error.

Unstable (try_from)

Performs the conversion.

impl Display for Signifix
[src]

Formats the value using the given formatter.