[−][src]Struct langtag::LanguageMut
Mutable reference to language subtags.
Implementations
impl<'a> LanguageMut<'a>
[src]
pub fn as_ref(&self) -> &Language
[src]
pub fn primary(&self) -> &PrimaryLanguage
[src]
Get the primary language subtag.
pub fn set_primary(&mut self, primary: &PrimaryLanguage)
[src]
Set the primary language subtag.
Note that no extended language subtags can be defined if the primary language subtag's length is greater than 3. If a new primary language subtag of length 4 or more is defined, extended language subtags are removed.
pub fn extension(&self) -> Option<&LanguageExtension>
[src]
Get the extended language subtags.
pub fn set_extension(&mut self, ext: Option<&LanguageExtension>) -> bool
[src]
Set the extended language subtags.
Note that no extended language subtags can be defined if the
primary language subtag's length is greater than 3.
This function returns true
if the extended language subtags
has been set or are None
,
and false
if the primary language subtag is of length 4 or
more and the extended language subtags have not been set.
pub fn extension_mut(&mut self) -> Option<LanguageExtensionMut<'_>>
[src]
Get and modify the extended language subtags, if any.
Auto Trait Implementations
impl<'a> RefUnwindSafe for LanguageMut<'a>
[src]
impl<'a> Send for LanguageMut<'a>
[src]
impl<'a> Sync for LanguageMut<'a>
[src]
impl<'a> Unpin for LanguageMut<'a>
[src]
impl<'a> !UnwindSafe for LanguageMut<'a>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,