Separable

Trait Separable 

Source
pub trait Separable {
    // Required methods
    fn separate_with_commas(&self) -> String;
    fn separate_with_underscores(&self) -> String;
}
Expand description

Extension trait for formatting numbers with separators.

Drop-in replacement for the thousands::Separable trait.

Required Methods§

Source

fn separate_with_commas(&self) -> String

Formats the number with commas as thousand separators.

Source

fn separate_with_underscores(&self) -> String

Formats the number with underscores as thousand separators.

Implementations on Foreign Types§

Source§

impl Separable for &str

Source§

impl Separable for f32

Source§

impl Separable for f64

Source§

impl Separable for i8

Source§

impl Separable for i16

Source§

impl Separable for i32

Source§

impl Separable for i64

Source§

impl Separable for i128

Source§

impl Separable for isize

Source§

impl Separable for u8

Source§

impl Separable for u16

Source§

impl Separable for u32

Source§

impl Separable for u64

Source§

impl Separable for u128

Source§

impl Separable for usize

Source§

impl Separable for String

Implementors§