Type Alias timeago::BoxedLanguage

source ·
pub type BoxedLanguage = Box<dyn Language + Send + Sync + 'static>;
Expand description

Dynamic version of the Language trait

Aliased Type§

struct BoxedLanguage(/* private fields */);

Trait Implementations§

1.0.0 · source§

impl<T, A> Deref for Box<T, A>where A: Allocator, T: ?Sized,

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &T

Dereferences the value.
source§

impl Language for BoxedLanguage

source§

fn clone_boxed(&self) -> BoxedLanguage

Make a dynamic copy of this language
source§

fn too_low(&self) -> &'static str

What to emit by default if value is too high
source§

fn too_high(&self) -> &'static str

What to emit by default if value is too low
source§

fn ago(&self) -> &'static str

Chunk of text to put at the end by default
source§

fn place_ago_before(&self) -> bool

For German and such
source§

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

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