[][src]Struct unic_langid_impl::LanguageIdentifier

pub struct LanguageIdentifier { /* fields omitted */ }

Methods

impl LanguageIdentifier[src]

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

pub fn from_parts_unchecked(
    language: Option<&'static str>,
    script: Option<&'static str>,
    region: Option<&'static str>,
    variants: Option<&[&'static str]>
) -> 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<(), LanguageIdentifierError>
[src]

pub fn get_script(&self) -> Option<&str>[src]

pub fn set_script(
    &mut self,
    script: Option<&str>
) -> Result<(), LanguageIdentifierError>
[src]

pub fn get_region(&self) -> Option<&str>[src]

pub fn set_region(
    &mut self,
    region: Option<&str>
) -> Result<(), LanguageIdentifierError>
[src]

pub fn get_variants(&self) -> Vec<&str>[src]

pub fn set_variants(
    &mut self,
    variants: &[&str]
) -> Result<(), LanguageIdentifierError>
[src]

Trait Implementations

impl AsRef<LanguageIdentifier> for LanguageIdentifier[src]

impl Default for LanguageIdentifier[src]

impl Eq for LanguageIdentifier[src]

impl Clone for LanguageIdentifier[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialEq<LanguageIdentifier> for LanguageIdentifier[src]

impl Hash for LanguageIdentifier[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Display for LanguageIdentifier[src]

impl Debug for LanguageIdentifier[src]

impl FromStr for LanguageIdentifier[src]

type Err = LanguageIdentifierError

The associated error which can be returned from parsing.

Auto Trait Implementations

impl Unpin for LanguageIdentifier

impl Sync for LanguageIdentifier

impl Send for LanguageIdentifier

impl UnwindSafe for LanguageIdentifier

impl RefUnwindSafe for LanguageIdentifier

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<T, U> Into<U> for T where
    U: From<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> Borrow<T> for T where
    T: ?Sized
[src]

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

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