pub trait NumberFormatter: Sync {
// Required methods
fn format(
&self,
locale: &str,
request: &NumberRequest<'_>,
out: NumberOut<'_>,
) -> bool;
fn plural(
&self,
locale: &str,
request: &NumberRequest<'_>,
) -> Option<Category>;
}Expand description
A number formatter for the intl option (Host::numbers;
plans/03-runtime.md §2.7, §5.3): the final “value + resolved options →
text” step and the plural category, where the numeric functions keep
MF2’s semantics in Rust. mf2-host-web implements it with Intl.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".