pub struct Language { /* private fields */ }Expand description
A spoken language identifier
Returned from various methods on LanguagePreferences
Use ToString::to_string() to convert to string of two letter lowercase
language code followed an forward slash and uppercase country code (example:
en/US).
The Default implementation can be used for fallbacks, and is set to
en/US since it’s a common choice for lingua franca. It is not guaranteed
to stay the same across whoami versions.
Language codes are defined in an unspecified superset of ISO 639, Country codes are defined in an unspecified superset of ISO 3166.
You can compare languages with strings (where the separator can be any of
-, _, or /).
Trait Implementations§
Source§impl FromStr for Language
impl FromStr for Language
impl Copy for Language
impl Eq for Language
impl StructuralPartialEq for Language
Auto Trait Implementations§
impl Freeze for Language
impl RefUnwindSafe for Language
impl Send for Language
impl Sync for Language
impl Unpin for Language
impl UnwindSafe for Language
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