Struct libusb::Language [−][src]
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.
Methods
impl Language
[src]
impl Language
pub fn lang_id(&self) -> u16
[src]
pub fn lang_id(&self) -> u16
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]
pub fn primary_language(&self) -> PrimaryLanguage
Returns the primary language.
pub fn sub_language(&self) -> SubLanguage
[src]
pub fn sub_language(&self) -> SubLanguage
Returns the sub language.
Trait Implementations
impl Debug for Language
[src]
impl Debug for Language
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Copy for Language
[src]
impl Copy for Language
impl Clone for Language
[src]
impl Clone for Language
fn clone(&self) -> Language
[src]
fn clone(&self) -> Language
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for Language
[src]
impl PartialEq for Language
fn eq(&self, other: &Language) -> bool
[src]
fn eq(&self, other: &Language) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Language) -> bool
[src]
fn ne(&self, other: &Language) -> bool
This method tests for !=
.
impl Eq for Language
[src]
impl Eq for Language