[][src]Struct loon::Opts

pub struct Opts<'a> { /* fields omitted */ }

Options for the translate call

Methods

impl<'a> Opts<'a>[src]

pub fn default_key<I: Into<Key<'a>>>(self, default_key: I) -> Self[src]

If the key does not exist, fallback to using another key.

pub fn locale(self, locale: &'a str) -> Self[src]

Set the locale for this translate call.

pub fn var<I: Into<String>, J: Display>(self, key: I, value: J) -> Self[src]

Set any variables to be interpolated.

pub fn count(self, count: i32) -> Self[src]

Set the count for this translation.

Uses Rails style pluralization options: zero, one, other.

Trait Implementations

impl<'a> Default for Opts<'a>[src]

impl<'a> From<()> for Opts<'a>[src]

impl<'a> From<Option<Opts<'a>>> for Opts<'a>[src]

impl<'a, T> From<T> for Opts<'a> where
    T: OptsPart<'a>, 
[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Opts<'a>

impl<'a> Send for Opts<'a>

impl<'a> Sync for Opts<'a>

impl<'a> Unpin for Opts<'a>

impl<'a> UnwindSafe for Opts<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.