pub struct Language { /* private fields */ }
Expand description
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
sourceimpl Language
impl Language
sourcepub fn lang_id(self) -> u16
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.
sourcepub fn primary_language(self) -> PrimaryLanguage
pub fn primary_language(self) -> PrimaryLanguage
Returns the primary language.
sourcepub fn sub_language(self) -> SubLanguage
pub fn sub_language(self) -> SubLanguage
Returns the sub language.
Trait Implementations
impl Copy for Language
impl Eq for Language
impl StructuralEq for Language
impl StructuralPartialEq for Language
Auto Trait Implementations
impl RefUnwindSafe for Language
impl Send for Language
impl Sync for Language
impl Unpin for Language
impl UnwindSafe for Language
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more