[−][src]Struct loon::Opts
Options (optional) 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]
T: OptsPart<'a>,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,