pub trait Language {
// Required methods
fn too_low(&self) -> &'static str;
fn too_high(&self) -> &'static str;
fn ago(&self) -> &'static str;
fn get_word(&self, tu: TimeUnit, x: u64) -> &'static str;
fn clone_boxed(&self) -> BoxedLanguage;
// Provided method
fn place_ago_before(&self) -> bool { ... }
}
Expand description
Interface for connecting natural languages to use for the formatting See “language” module documentation for details.
Required Methods§
sourcefn get_word(&self, tu: TimeUnit, x: u64) -> &'static str
fn get_word(&self, tu: TimeUnit, x: u64) -> &'static str
Get word representing the given time unit, for using with x
number
sourcefn clone_boxed(&self) -> BoxedLanguage
fn clone_boxed(&self) -> BoxedLanguage
Make a dynamic copy of this language
Provided Methods§
sourcefn place_ago_before(&self) -> bool
fn place_ago_before(&self) -> bool
For German and such