pub trait DisplayNumber{
// Required methods
fn format<'a>(
&self,
pattern: &'a str,
sym: &'a NumberSymbols,
) -> Result<FormattedNumber<'a, Self>, NumberFmtError>;
fn fmt<'a>(&self, format: &'a NumberFormat) -> RefFormattedNumber<'a, Self>;
}
Expand description
Format a number according to a format string.
Required Methods§
Sourcefn format<'a>(
&self,
pattern: &'a str,
sym: &'a NumberSymbols,
) -> Result<FormattedNumber<'a, Self>, NumberFmtError>
fn format<'a>( &self, pattern: &'a str, sym: &'a NumberSymbols, ) -> Result<FormattedNumber<'a, Self>, NumberFmtError>
Format using the format-string. Uses the given symbols.
Sourcefn fmt<'a>(&self, format: &'a NumberFormat) -> RefFormattedNumber<'a, Self>
fn fmt<'a>(&self, format: &'a NumberFormat) -> RefFormattedNumber<'a, Self>
Format using the NumberFormat
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.