Struct LANG

Source
pub struct LANG(/* private fields */);
Available on crate feature kernel only.
Expand description

Language identifier (u16).

Implementations§

Source§

impl LANG

Source

pub const unsafe fn as_mut(&mut self) -> &mut u16

Returns a mutable reference to the underlying raw value.

§Safety

Be sure the integer being set is meaningful for the actual type.

Source

pub const unsafe fn from_raw(v: u16) -> Self

Constructs a new object by wrapping the given integer value.

§Safety

Be sure the given value is meaningful for the actual type.

Source

pub const fn raw(&self) -> u16

Returns the primitive integer underlying value.

This method is similar to Into, but it is const, therefore it can be used in const contexts.

Source§

impl LANG

Source

pub const NEUTRAL: Self

Source

pub const INVARIANT: Self

Source

pub const AFRIKAANS: Self

Source

pub const ALBANIAN: Self

Source

pub const ALSATIAN: Self

Source

pub const AMHARIC: Self

Source

pub const ARABIC: Self

Source

pub const ARMENIAN: Self

Source

pub const ASSAMESE: Self

Source

pub const AZERI: Self

Source

pub const AZERBAIJANI: Self

Source

pub const BANGLA: Self

Source

pub const BASHKIR: Self

Source

pub const BASQUE: Self

Source

pub const BELARUSIAN: Self

Source

pub const BENGALI: Self

Source

pub const BRETON: Self

Source

pub const BOSNIAN: Self

Source

pub const BOSNIAN_NEUTRAL: Self

Source

pub const BULGARIAN: Self

Source

pub const CATALAN: Self

Source

pub const CENTRAL_KURDISH: Self

Source

pub const CHEROKEE: Self

Source

pub const CHINESE: Self

Source

pub const CHINESE_SIMPLIFIED: Self

Source

pub const CHINESE_TRADITIONAL: Self

Source

pub const CORSICAN: Self

Source

pub const CROATIAN: Self

Source

pub const CZECH: Self

Source

pub const DANISH: Self

Source

pub const DARI: Self

Source

pub const DIVEHI: Self

Source

pub const DUTCH: Self

Source

pub const ENGLISH: Self

Source

pub const ESTONIAN: Self

Source

pub const FAEROESE: Self

Source

pub const FARSI: Self

Source

pub const FILIPINO: Self

Source

pub const FINNISH: Self

Source

pub const FRENCH: Self

Source

pub const FRISIAN: Self

Source

pub const FULAH: Self

Source

pub const GALICIAN: Self

Source

pub const GEORGIAN: Self

Source

pub const GERMAN: Self

Source

pub const GREEK: Self

Source

pub const GREENLANDIC: Self

Source

pub const GUJARATI: Self

Source

pub const HAUSA: Self

Source

pub const HAWAIIAN: Self

Source

pub const HEBREW: Self

Source

pub const HINDI: Self

Source

pub const HUNGARIAN: Self

Source

pub const ICELANDIC: Self

Source

pub const IGBO: Self

Source

pub const INDONESIAN: Self

Source

pub const INUKTITUT: Self

Source

pub const IRISH: Self

Source

pub const ITALIAN: Self

Source

pub const JAPANESE: Self

Source

pub const KANNADA: Self

Source

pub const KASHMIRI: Self

Source

pub const KAZAK: Self

Source

pub const KHMER: Self

Source

pub const KICHE: Self

Source

pub const KINYARWANDA: Self

Source

pub const KONKANI: Self

Source

pub const KOREAN: Self

Source

pub const KYRGYZ: Self

Source

pub const LAO: Self

Source

pub const LATVIAN: Self

Source

pub const LITHUANIAN: Self

Source

pub const LOWER_SORBIAN: Self

Source

pub const LUXEMBOURGISH: Self

Source

pub const MACEDONIAN: Self

Source

pub const MALAY: Self

Source

pub const MALAYALAM: Self

Source

pub const MALTESE: Self

Source

pub const MANIPURI: Self

Source

pub const MAORI: Self

Source

pub const MAPUDUNGUN: Self

Source

pub const MARATHI: Self

Source

pub const MOHAWK: Self

Source

pub const MONGOLIAN: Self

Source

pub const NEPALI: Self

Source

pub const NORWEGIAN: Self

Source

pub const OCCITAN: Self

Source

pub const ODIA: Self

Source

pub const ORIYA: Self

Source

pub const PASHTO: Self

Source

pub const PERSIAN: Self

Source

pub const POLISH: Self

Source

pub const PORTUGUESE: Self

Source

pub const PULAR: Self

Source

pub const PUNJABI: Self

Source

pub const QUECHUA: Self

Source

pub const ROMANIAN: Self

Source

pub const ROMANSH: Self

Source

pub const RUSSIAN: Self

Source

pub const SAKHA: Self

Source

pub const SAMI: Self

Source

pub const SANSKRIT: Self

Source

pub const SCOTTISH_GAELIC: Self

Source

pub const SERBIAN: Self

Source

pub const SERBIAN_NEUTRAL: Self

Source

pub const SINDHI: Self

Source

pub const SINHALESE: Self

Source

pub const SLOVAK: Self

Source

pub const SLOVENIAN: Self

Source

pub const SOTHO: Self

Source

pub const SPANISH: Self

Source

pub const SWAHILI: Self

Source

pub const SWEDISH: Self

Source

pub const SYRIAC: Self

Source

pub const TAJIK: Self

Source

pub const TAMAZIGHT: Self

Source

pub const TAMIL: Self

Source

pub const TATAR: Self

Source

pub const TELUGU: Self

Source

pub const THAI: Self

Source

pub const TIBETAN: Self

Source

pub const TIGRIGNA: Self

Source

pub const TIGRINYA: Self

Source

pub const TSWANA: Self

Source

pub const TURKISH: Self

Source

pub const TURKMEN: Self

Source

pub const UIGHUR: Self

Source

pub const UKRAINIAN: Self

Source

pub const UPPER_SORBIAN: Self

Source

pub const URDU: Self

Source

pub const UZBEK: Self

Source

pub const VALENCIAN: Self

Source

pub const VIETNAMESE: Self

Source

pub const WELSH: Self

Source

pub const WOLOF: Self

Source

pub const XHOSA: Self

Source

pub const YAKUT: Self

Source

pub const YI: Self

Source

pub const YORUBA: Self

Source

pub const ZULU: Self

Trait Implementations§

Source§

impl AsRef<u16> for LANG

Source§

fn as_ref(&self) -> &u16

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Binary for LANG

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Clone for LANG

Source§

fn clone(&self) -> LANG

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LANG

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for LANG

Source§

fn default() -> LANG

Returns the “default value” for a type. Read more
Source§

impl Display for LANG

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<LANG> for u16

Source§

fn from(v: LANG) -> Self

Converts to this type from the input type.
Source§

impl Hash for LANG

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

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

Feeds a slice of this type into the given Hasher. Read more
Source§

impl LowerHex for LANG

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Octal for LANG

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Ord for LANG

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for LANG

Source§

fn eq(&self, other: &LANG) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for LANG

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl UpperHex for LANG

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for LANG

Source§

impl Eq for LANG

Source§

impl StructuralPartialEq for LANG

Auto Trait Implementations§

§

impl Freeze for LANG

§

impl RefUnwindSafe for LANG

§

impl Send for LANG

§

impl Sync for LANG

§

impl Unpin for LANG

§

impl UnwindSafe for LANG

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.