Trait FormatIntegerValue

Source
pub trait FormatIntegerValue {
    // Required method
    fn format_unit(&self, singular: &str, plural: &str) -> String;
}
Expand description

Trait for formatting integer values with their units.

Required Methods§

Source

fn format_unit(&self, singular: &str, plural: &str) -> String

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

§Arguments
  • singular - The singular form of the unit.
  • plural - The plural form of the unit.
§Returns

A formatted string.

Implementations on Foreign Types§

Source§

impl FormatIntegerValue for u8

Source§

fn format_unit(&self, singular: &str, plural: &str) -> String

Source§

impl FormatIntegerValue for u64

Source§

fn format_unit(&self, singular: &str, plural: &str) -> String

Implementors§