[][src]Struct unic_locale_impl::Locale

pub struct Locale {
    pub langid: LanguageIdentifier,
    pub extensions: ExtensionsMap,
}

Fields

langid: LanguageIdentifierextensions: ExtensionsMap

Methods

impl Locale[src]

pub fn from_parts<S: AsRef<str>>(
    language: Option<S>,
    script: Option<S>,
    region: Option<S>,
    variants: &[S],
    extensions: Option<ExtensionsMap>
) -> Result<Self, LocaleError>
[src]

pub fn into_raw_parts(
    self
) -> (Option<u64>, Option<u32>, Option<u32>, Option<Box<[u64]>>, String)
[src]

pub unsafe fn from_raw_parts_unchecked(
    language: Option<TinyStr8>,
    script: Option<TinyStr4>,
    region: Option<TinyStr4>,
    variants: Option<Box<[TinyStr8]>>,
    extensions: ExtensionsMap
) -> Self
[src]

pub fn matches<O: AsRef<Self>>(
    &self,
    other: &O,
    self_as_range: bool,
    other_as_range: bool
) -> bool
[src]

pub fn get_language(&self) -> &str[src]

pub fn set_language(
    &mut self,
    language: Option<&str>
) -> Result<(), LocaleError>
[src]

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 Into<LanguageIdentifier> for Locale[src]

impl Default for Locale[src]

impl Clone for Locale[src]

impl AsRef<LanguageIdentifier> for Locale[src]

impl AsRef<Locale> for Locale[src]

impl PartialEq<Locale> for Locale[src]

impl From<LanguageIdentifier> for Locale[src]

impl Debug for Locale[src]

impl Display for Locale[src]

impl FromStr for Locale[src]

type Err = LocaleError

The associated error which can be returned from parsing.

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]

type Owned = T

The resulting type after obtaining ownership.

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

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

impl<T> ToString for T where
    T: Display + ?Sized
[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.

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

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

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