[−][src]Enum rtdlib::types::LanguagePackStringValue
Represents the value of a string in a language pack
Variants
Ordinary(LanguagePackStringValueOrdinary)An ordinary language pack string
Pluralized(LanguagePackStringValuePluralized)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
Deleted(LanguagePackStringValueDeleted)A deleted language pack string, the value should be taken from the built-in english language pack
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
Methods
impl LanguagePackStringValue[src]
pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self>[src]
pub fn is_ordinary(&self) -> bool[src]
pub fn is_pluralized(&self) -> bool[src]
pub fn is_deleted(&self) -> bool[src]
pub fn is_get_language_pack_string(&self) -> bool[src]
pub fn on_ordinary<F: FnOnce(&LanguagePackStringValueOrdinary)>(
&self,
fnc: F
) -> &Self[src]
&self,
fnc: F
) -> &Self
pub fn on_pluralized<F: FnOnce(&LanguagePackStringValuePluralized)>(
&self,
fnc: F
) -> &Self[src]
&self,
fnc: F
) -> &Self
pub fn on_deleted<F: FnOnce(&LanguagePackStringValueDeleted)>(
&self,
fnc: F
) -> &Self[src]
&self,
fnc: F
) -> &Self
pub fn on_get_language_pack_string<F: FnOnce(&GetLanguagePackString)>(
&self,
fnc: F
) -> &Self[src]
&self,
fnc: F
) -> &Self
pub fn as_ordinary(&self) -> Option<&LanguagePackStringValueOrdinary>[src]
pub fn as_pluralized(&self) -> Option<&LanguagePackStringValuePluralized>[src]
pub fn as_deleted(&self) -> Option<&LanguagePackStringValueDeleted>[src]
pub fn as_get_language_pack_string(&self) -> Option<&GetLanguagePackString>[src]
pub fn ordinary<T: AsRef<LanguagePackStringValueOrdinary>>(t: T) -> Self[src]
pub fn pluralized<T: AsRef<LanguagePackStringValuePluralized>>(t: T) -> Self[src]
pub fn deleted<T: AsRef<LanguagePackStringValueDeleted>>(t: T) -> Self[src]
pub fn get_language_pack_string<T: AsRef<GetLanguagePackString>>(t: T) -> Self[src]
Trait Implementations
impl AsRef<LanguagePackStringValue> for LanguagePackStringValue[src]
fn as_ref(&self) -> &LanguagePackStringValue[src]
impl Clone for LanguagePackStringValue[src]
fn clone(&self) -> LanguagePackStringValue[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for LanguagePackStringValue[src]
impl Default for LanguagePackStringValue[src]
impl<'de> Deserialize<'de> for LanguagePackStringValue[src]
fn deserialize<D>(deserializer: D) -> Result<LanguagePackStringValue, D::Error> where
D: Deserializer<'de>, [src]
D: Deserializer<'de>,
impl RObject for LanguagePackStringValue[src]
impl Serialize for LanguagePackStringValue[src]
Auto Trait Implementations
impl RefUnwindSafe for LanguagePackStringValue
impl Send for LanguagePackStringValue
impl Sync for LanguagePackStringValue
impl Unpin for LanguagePackStringValue
impl UnwindSafe for LanguagePackStringValue
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> DeserializeOwned for T where
T: Deserialize<'de>, [src]
T: Deserialize<'de>,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
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>,