[][src]Enum rtdlib::types::LanguagePackStringValue

pub enum LanguagePackStringValue {
    GetLanguagePackString(GetLanguagePackString),
    Deleted(LanguagePackStringValueDeleted),
    Ordinary(LanguagePackStringValueOrdinary),
    Pluralized(LanguagePackStringValuePluralized),
    // some variants omitted
}

Represents the value of a string in a language pack

Variants

GetLanguagePackString(GetLanguagePackString)

Returns a string stored in the local database from the specified localization target and language pack by its key. Returns a 404 error if the string is not found. This is an offline method. Can be called before authorization. Can be called synchronously

A deleted language pack string, the value should be taken from the built-in english language pack

An ordinary language pack string

A language pack string which has different forms based on the number of some object it mentions. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info

Implementations

impl LanguagePackStringValue[src]

pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self>[src]

pub fn is_get_language_pack_string(&self) -> bool[src]

pub fn is_deleted(&self) -> bool[src]

pub fn is_ordinary(&self) -> bool[src]

pub fn is_pluralized(&self) -> bool[src]

pub fn on_get_language_pack_string<F: FnOnce(&GetLanguagePackString)>(
    &self,
    fnc: F
) -> &Self
[src]

pub fn on_deleted<F: FnOnce(&LanguagePackStringValueDeleted)>(
    &self,
    fnc: F
) -> &Self
[src]

pub fn on_ordinary<F: FnOnce(&LanguagePackStringValueOrdinary)>(
    &self,
    fnc: F
) -> &Self
[src]

pub fn on_pluralized<F: FnOnce(&LanguagePackStringValuePluralized)>(
    &self,
    fnc: F
) -> &Self
[src]

pub fn as_get_language_pack_string(&self) -> Option<&GetLanguagePackString>[src]

pub fn as_deleted(&self) -> Option<&LanguagePackStringValueDeleted>[src]

pub fn as_ordinary(&self) -> Option<&LanguagePackStringValueOrdinary>[src]

pub fn as_pluralized(&self) -> Option<&LanguagePackStringValuePluralized>[src]

pub fn get_language_pack_string<T: AsRef<GetLanguagePackString>>(t: T) -> Self[src]

pub fn deleted<T: AsRef<LanguagePackStringValueDeleted>>(t: T) -> Self[src]

pub fn ordinary<T: AsRef<LanguagePackStringValueOrdinary>>(t: T) -> Self[src]

pub fn pluralized<T: AsRef<LanguagePackStringValuePluralized>>(t: T) -> Self[src]

Trait Implementations

impl AsRef<LanguagePackStringValue> for LanguagePackStringValue[src]

impl Clone for LanguagePackStringValue[src]

impl Debug for LanguagePackStringValue[src]

impl Default for LanguagePackStringValue[src]

impl<'de> Deserialize<'de> for LanguagePackStringValue[src]

impl RObject for LanguagePackStringValue[src]

impl Serialize for LanguagePackStringValue[src]

Auto Trait Implementations

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.