Struct lcid::LanguageId [−][src]
pub struct LanguageId { pub name: &'static str, pub lcid: u32, pub english_name: &'static str, pub iso639_two_letter: &'static str, pub iso639_three_letter: &'static str, pub windows_three_letter: &'static str, pub ansi_code_page: Option<AnsiCodePage>, }
Expand description
A language’s identifiers and information. Lookups from numeric or named
identifiers return a reference to statically defined LanguageId
.
Fields
name: &'static str
A unique name that identifies the language (IETF language tag).
lcid: u32
The language code ID for the language. This does not identify a language uniquely.
english_name: &'static str
A non-localized, English, readable name for the language.
iso639_two_letter: &'static str
A two-letter ISO-639 code for the language.
iso639_three_letter: &'static str
A three-letter ISO-639 code for the language.
windows_three_letter: &'static str
A three-letter code for the language used in the Windows API.
ansi_code_page: Option<AnsiCodePage>
The corresponding ANSI code page that may be used to encode this
language, or None
if the language can’t be encoded outside Unicode.
Implementations
The primary language ID part of the language’s LCID
The sub language ID part of the language’s LCID
Trait Implementations
Try to identify a LanguageId
from a name. This returns an
error if the name is unknown or reserved.
type Error = NameLookupError
type Error = NameLookupError
The type returned in the event of a conversion error.
Try to identify a LanguageId
from a numeric LCID. This returns an
error if:
- The LCID has any reserved bits set
- The LCID has a sort ID
- The LCID maps to an unknown, reserved, or neither defined nor reserved language
type Error = LcidLookupError
type Error = LcidLookupError
The type returned in the event of a conversion error.
Auto Trait Implementations
impl RefUnwindSafe for LanguageId
impl Send for LanguageId
impl Sync for LanguageId
impl Unpin for LanguageId
impl UnwindSafe for LanguageId
Blanket Implementations
Mutably borrows from an owned value. Read more