Trait num_format::ToFormattedString

source ·
pub trait ToFormattedString: Sealed + Sized {
    // Provided method
    fn to_formatted_string<F>(&self, format: &F) -> String
       where F: Format { ... }
}
Expand description

A key trait. Gives numbers the to_formatted_string method.

This trait is sealed; so you may not implement it on your own types.

Provided Methods§

source

fn to_formatted_string<F>(&self, format: &F) -> String
where F: Format,

Returns a string representation of the number formatted according to the provided format.

Object Safety§

This trait is not object safe.

Implementors§