Trait timeago::Language[][src]

pub trait Language {
    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; fn place_ago_before(&self) -> bool { ... } }

Interface for connecting natural languages to use for the formatting See “language” module documentation for details.

Required methods

fn too_low(&self) -> &'static str[src]

What to emit by default if value is too high

fn too_high(&self) -> &'static str[src]

What to emit by default if value is too low

fn ago(&self) -> &'static str[src]

Chunk of text to put at the end by default

fn get_word(&self, tu: TimeUnit, x: u64) -> &'static str[src]

Get word representing the given time unit, for using with x number

fn clone_boxed(&self) -> BoxedLanguage[src]

Make a dynamic copy of this language

Loading content...

Provided methods

fn place_ago_before(&self) -> bool[src]

For German and such

Loading content...

Implementors

impl Language for Belarusian[src]

impl Language for Chinese[src]

impl Language for Danish[src]

impl Language for English[src]

impl Language for French[src]

impl Language for German[src]

impl Language for Japanese[src]

impl Language for Polish[src]

impl Language for Portuguese[src]

impl Language for Romanian[src]

impl Language for Russian[src]

impl Language for Spanish[src]

impl Language for Swedish[src]

impl Language for Turkish[src]

impl Language for BoxedLanguage[src]

Loading content...