Struct swash::text::Language[][src]

pub struct Language { /* fields omitted */ }

Representation of a language and its associated script and region.

Implementations

impl Language[src]

pub fn parse(tag: &str) -> Option<Self>[src]

Parses a language tag.

pub fn from_opentype(tag: Tag) -> Option<Self>[src]

Returns the language associated with the specified OpenType language tag.

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

Returns the language component.

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

Returns the script component.

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

Returns the region component.

pub fn cjk(&self) -> Cjk[src]

Returns the CJK language.

pub fn name(&self) -> Option<&'static str>[src]

Returns the name of the language.

pub fn to_opentype(&self) -> Option<Tag>[src]

Returns the associated OpenType language tag.

Trait Implementations

impl Clone for Language[src]

impl Copy for Language[src]

impl Debug for Language[src]

impl Display for Language[src]

impl Eq for Language[src]

impl PartialEq<Language> for Language[src]

impl StructuralEq for Language[src]

impl StructuralPartialEq for Language[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> 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> 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.