Trait FormatFloatValue

Source
pub trait FormatFloatValue {
    // Required method
    fn format_float_unit(&self, decimal: usize, unit: Unit) -> String;
}
Expand description

Trait for formatting floating-point values with their units

Required Methods§

Source

fn format_float_unit(&self, decimal: usize, unit: Unit) -> String

Formats a value with its unit (singular or plural).

§Arguments
  • decimal - The number of decimal places to display.
  • unit - Unit types with their singular/plural pairs.
§Returns

A formatted string.

Implementations on Foreign Types§

Source§

impl FormatFloatValue for f64

Source§

fn format_float_unit(&self, decimal: usize, unit: Unit) -> String

Implementors§