pub struct LANGID(/* private fields */);
Available on crate feature
kernel
only.Expand description
LANGID
language identifier.
Implementations§
source§impl LANGID
impl LANGID
sourcepub const unsafe fn from_raw(v: u16) -> Self
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.
sourcepub const fn raw(&self) -> u16
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 LANGID
impl LANGID
sourcepub const SYSTEM_DEFAULT: Self = _
pub const SYSTEM_DEFAULT: Self = _
LANGID
composed of
LANG::NEUTRAL
and
SUBLANG::SYS_DEFAULT
.
sourcepub const USER_DEFAULT: Self = _
pub const USER_DEFAULT: Self = _
LANGID
composed of
LANG::NEUTRAL
and
SUBLANG::DEFAULT
.
sourcepub const fn new(lang: LANG, sublang: SUBLANG) -> Self
pub const fn new(lang: LANG, sublang: SUBLANG) -> Self
Creates a new LANGID
. Originally
MAKELANGID
macro.
sourcepub const fn primary_lang_id(self) -> LANG
pub const fn primary_lang_id(self) -> LANG
Returns the primary language ID. Originally
PRIMARYLANGID
macro.
sourcepub const fn sub_lang_id(self) -> SUBLANG
pub const fn sub_lang_id(self) -> SUBLANG
Returns the sublanguage ID. Originally
SUBLANGID
macro.
Trait Implementations§
source§impl IntUnderlying for LANGID
impl IntUnderlying for LANGID
source§impl Ord for LANGID
impl Ord for LANGID
source§impl PartialEq for LANGID
impl PartialEq for LANGID
source§impl PartialOrd for LANGID
impl PartialOrd for LANGID
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for LANGID
impl Eq for LANGID
impl Send for LANGID
impl StructuralPartialEq for LANGID
Auto Trait Implementations§
impl Freeze for LANGID
impl RefUnwindSafe for LANGID
impl Sync for LANGID
impl Unpin for LANGID
impl UnwindSafe for LANGID
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more