[][src]Struct rusb::Language

pub struct Language { /* fields omitted */ }

A language used to read string descriptors from USB devices.

A language consists of a primary language and a sub language. Primary languages are language families, such as English or Spanish. Sub languages identify a dialect of the primary language. The dialect may be based on regional differences (United States English compared to United Kindgdom English), writing systems (Cyrillic compared to Latin), or age (Modern compared to Traditional). Each primary language has its own set of sub languages.

Implementations

impl Language[src]

pub fn lang_id(self) -> u16[src]

Returns the language's 16-bit LANGID.

Each language's LANGID is defined by the USB forum (http://www.usb.org/developers/docs/USB_LANGIDs.pdf).

pub fn primary_language(self) -> PrimaryLanguage[src]

Returns the primary language.

pub fn sub_language(self) -> SubLanguage[src]

Returns the sub language.

Trait Implementations

impl Clone for Language[src]

impl Copy for Language[src]

impl Debug 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, 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.