Struct LanguageCode
pub struct LanguageCode { /* private fields */ }Expand description
A normalized 2-letter or 3-letter language subtag.
Implementations§
§impl LanguageCode
impl LanguageCode
pub fn new(input: &str) -> Option<LanguageCode>
pub fn new(input: &str) -> Option<LanguageCode>
Parses and normalizes a language subtag.
pub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the language code and returns the normalized string.
Trait Implementations§
§impl AsRef<str> for LanguageCode
impl AsRef<str> for LanguageCode
§impl Clone for LanguageCode
impl Clone for LanguageCode
§fn clone(&self) -> LanguageCode
fn clone(&self) -> LanguageCode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for LanguageCode
impl Debug for LanguageCode
§impl Display for LanguageCode
impl Display for LanguageCode
§impl Hash for LanguageCode
impl Hash for LanguageCode
§impl Ord for LanguageCode
impl Ord for LanguageCode
§impl PartialEq for LanguageCode
impl PartialEq for LanguageCode
§impl PartialOrd for LanguageCode
impl PartialOrd for LanguageCode
impl Eq for LanguageCode
impl StructuralPartialEq for LanguageCode
Auto Trait Implementations§
impl Freeze for LanguageCode
impl RefUnwindSafe for LanguageCode
impl Send for LanguageCode
impl Sync for LanguageCode
impl Unpin for LanguageCode
impl UnsafeUnpin for LanguageCode
impl UnwindSafe for LanguageCode
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