pub enum LenientLanguageTag<'a> {
WellFormed(LanguageTag<'a>),
Malformed(&'a str),
}
Expand description
Language tag that may not be well-formed.
Variants
WellFormed(LanguageTag<'a>)
Malformed(&'a str)
Implementations
sourceimpl<'a> LenientLanguageTag<'a>
impl<'a> LenientLanguageTag<'a>
pub fn is_well_formed(&self) -> bool
pub fn as_language_tag(&self) -> Option<LanguageTag<'a>>
pub fn as_str(&self) -> &str
pub fn to_owned(self) -> LenientLanguageTagBuf
Trait Implementations
sourceimpl<'a> Clone for LenientLanguageTag<'a>
impl<'a> Clone for LenientLanguageTag<'a>
sourcefn clone(&self) -> LenientLanguageTag<'a>
fn clone(&self) -> LenientLanguageTag<'a>
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<'a> Debug for LenientLanguageTag<'a>
impl<'a> Debug for LenientLanguageTag<'a>
sourceimpl<'a> Display for LenientLanguageTag<'a>
impl<'a> Display for LenientLanguageTag<'a>
sourceimpl<'a> Hash for LenientLanguageTag<'a>
impl<'a> Hash for LenientLanguageTag<'a>
sourceimpl<'a> PartialEq<LenientLanguageTag<'a>> for LenientLanguageTag<'a>
impl<'a> PartialEq<LenientLanguageTag<'a>> for LenientLanguageTag<'a>
sourcefn eq(&self, other: &LenientLanguageTag<'a>) -> bool
fn eq(&self, other: &LenientLanguageTag<'a>) -> bool
sourceimpl<'a> PrecomputeSize for LenientLanguageTag<'a>
impl<'a> PrecomputeSize for LenientLanguageTag<'a>
sourceimpl<'a> Print for LenientLanguageTag<'a>
impl<'a> Print for LenientLanguageTag<'a>
fn fmt_with(
&self,
f: &mut Formatter<'_>,
_options: &Options,
_indent: usize
) -> Result
sourcefn pretty_print(&self) -> Printed<'_, Self>
fn pretty_print(&self) -> Printed<'_, Self>
Print the value with
Options::pretty
options.sourcefn compact_print(&self) -> Printed<'_, Self>
fn compact_print(&self) -> Printed<'_, Self>
Print the value with
Options::compact
options.sourcefn inline_print(&self) -> Printed<'_, Self>
fn inline_print(&self) -> Printed<'_, Self>
Print the value with
Options::inline
options.sourcefn print_with(&self, options: Options) -> Printed<'_, Self>
fn print_with(&self, options: Options) -> Printed<'_, Self>
Print the value with the given options.
sourceimpl<'a> StrippedPartialEq<LenientLanguageTag<'a>> for LenientLanguageTag<'a>
impl<'a> StrippedPartialEq<LenientLanguageTag<'a>> for LenientLanguageTag<'a>
fn stripped_eq(&self, other: &Self) -> bool
impl<'a> Copy for LenientLanguageTag<'a>
impl<'a> Eq for LenientLanguageTag<'a>
impl<'a> StructuralEq for LenientLanguageTag<'a>
impl<'a> StructuralPartialEq for LenientLanguageTag<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for LenientLanguageTag<'a>
impl<'a> Send for LenientLanguageTag<'a>
impl<'a> Sync for LenientLanguageTag<'a>
impl<'a> Unpin for LenientLanguageTag<'a>
impl<'a> UnwindSafe for LenientLanguageTag<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> BorrowStripped for T
impl<T> BorrowStripped for T
sourceimpl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
fn equivalent(&self, key: &K) -> bool
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.