[−][src]Struct unic_locale::Locale
Fields
langid: LanguageIdentifier
extensions: ExtensionsMap
Methods
impl Locale
[src]
pub fn from_parts<S>(
language: Option<S>,
script: Option<S>,
region: Option<S>,
variants: &[S],
extensions: Option<ExtensionsMap>
) -> Result<Locale, LocaleError> where
S: AsRef<str>,
[src]
language: Option<S>,
script: Option<S>,
region: Option<S>,
variants: &[S],
extensions: Option<ExtensionsMap>
) -> Result<Locale, LocaleError> where
S: AsRef<str>,
pub fn into_raw_parts(
self
) -> (Option<u64>, Option<u32>, Option<u32>, Option<Box<[u64]>>, String)
[src]
self
) -> (Option<u64>, Option<u32>, Option<u32>, Option<Box<[u64]>>, String)
pub unsafe fn from_raw_parts_unchecked(
language: Option<TinyStr8>,
script: Option<TinyStr4>,
region: Option<TinyStr4>,
variants: Option<Box<[TinyStr8]>>,
extensions: ExtensionsMap
) -> Locale
[src]
language: Option<TinyStr8>,
script: Option<TinyStr4>,
region: Option<TinyStr4>,
variants: Option<Box<[TinyStr8]>>,
extensions: ExtensionsMap
) -> Locale
pub fn matches<O>(
&self,
other: &O,
self_as_range: bool,
other_as_range: bool
) -> bool where
O: AsRef<Locale>,
[src]
&self,
other: &O,
self_as_range: bool,
other_as_range: bool
) -> bool where
O: AsRef<Locale>,
pub fn get_language(&self) -> &str
[src]
pub fn set_language(
&mut self,
language: Option<&str>
) -> Result<(), LocaleError>
[src]
&mut self,
language: Option<&str>
) -> Result<(), LocaleError>
pub fn get_script(&self) -> Option<&str>
[src]
pub fn set_script(&mut self, script: Option<&str>) -> Result<(), LocaleError>
[src]
pub fn get_region(&self) -> Option<&str>
[src]
pub fn set_region(&mut self, region: Option<&str>) -> Result<(), LocaleError>
[src]
pub fn get_variants(&self) -> Vec<&str>
[src]
pub fn set_variants(&mut self, variants: &[&str]) -> Result<(), LocaleError>
[src]
pub fn get_character_direction(&self) -> CharacterDirection
[src]
Trait Implementations
impl AsRef<LanguageIdentifier> for Locale
[src]
fn as_ref(&self) -> &LanguageIdentifier
[src]
impl AsRef<Locale> for Locale
[src]
impl PartialEq<Locale> for Locale
[src]
impl Clone for Locale
[src]
impl Into<LanguageIdentifier> for Locale
[src]
fn into(self) -> LanguageIdentifier
[src]
impl Display for Locale
[src]
impl FromStr for Locale
[src]
type Err = LocaleError
The associated error which can be returned from parsing.
fn from_str(source: &str) -> Result<Locale, <Locale as FromStr>::Err>
[src]
impl Default for Locale
[src]
impl From<LanguageIdentifier> for Locale
[src]
fn from(langid: LanguageIdentifier) -> Locale
[src]
impl Debug for Locale
[src]
Auto Trait Implementations
impl Send for Locale
impl Unpin for Locale
impl Sync for Locale
impl UnwindSafe for Locale
impl RefUnwindSafe for Locale
Blanket Implementations
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> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,