pub struct LenientLangTagBuf(/* private fields */);Expand description
Owned language tag that may not be well-formed.
Implementations§
Source§impl LenientLangTagBuf
 
impl LenientLangTagBuf
pub fn new(s: String) -> (Self, Option<InvalidLangTag<String>>)
pub fn as_lenient_lang_tag_ref(&self) -> &LenientLangTag
pub fn into_string(self) -> String
pub fn into_well_formed(self) -> Result<LangTagBuf, InvalidLangTag<String>>
Methods from Deref<Target = LenientLangTag>§
Trait Implementations§
Source§impl AsRef<LenientLangTag> for LenientLangTagBuf
 
impl AsRef<LenientLangTag> for LenientLangTagBuf
Source§fn as_ref(&self) -> &LenientLangTag
 
fn as_ref(&self) -> &LenientLangTag
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Borrow<LenientLangTag> for LenientLangTagBuf
 
impl Borrow<LenientLangTag> for LenientLangTagBuf
Source§fn borrow(&self) -> &LenientLangTag
 
fn borrow(&self) -> &LenientLangTag
Immutably borrows from an owned value. Read more
Source§impl Clone for LenientLangTagBuf
 
impl Clone for LenientLangTagBuf
Source§fn clone(&self) -> LenientLangTagBuf
 
fn clone(&self) -> LenientLangTagBuf
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 moreSource§impl Debug for LenientLangTagBuf
 
impl Debug for LenientLangTagBuf
Source§impl Deref for LenientLangTagBuf
 
impl Deref for LenientLangTagBuf
Source§impl Display for LenientLangTagBuf
 
impl Display for LenientLangTagBuf
Source§impl From<LangTagBuf> for LenientLangTagBuf
 
impl From<LangTagBuf> for LenientLangTagBuf
Source§fn from(tag: LangTagBuf) -> Self
 
fn from(tag: LangTagBuf) -> Self
Converts to this type from the input type.
Source§impl From<String> for LenientLangTagBuf
 
impl From<String> for LenientLangTagBuf
Source§impl Hash for LenientLangTagBuf
 
impl Hash for LenientLangTagBuf
Source§impl Ord for LenientLangTagBuf
 
impl Ord for LenientLangTagBuf
Source§impl PartialEq for LenientLangTagBuf
 
impl PartialEq for LenientLangTagBuf
Source§impl PartialOrd for LenientLangTagBuf
 
impl PartialOrd for LenientLangTagBuf
Source§impl PrecomputeSize for LenientLangTagBuf
 
impl PrecomputeSize for LenientLangTagBuf
Source§impl Print for LenientLangTagBuf
 
impl Print for LenientLangTagBuf
fn fmt_with( &self, f: &mut Formatter<'_>, _options: &Options, _indent: usize, ) -> Result
Source§fn pretty_print(&self) -> Printed<'_, Self>
 
fn pretty_print(&self) -> Printed<'_, Self>
Print the value with 
Options::pretty options.Source§fn compact_print(&self) -> Printed<'_, Self>
 
fn compact_print(&self) -> Printed<'_, Self>
Print the value with 
Options::compact options.Source§fn inline_print(&self) -> Printed<'_, Self>
 
fn inline_print(&self) -> Printed<'_, Self>
Print the value with 
Options::inline options.Source§fn print_with(&self, options: Options) -> Printed<'_, Self>
 
fn print_with(&self, options: Options) -> Printed<'_, Self>
Print the value with the given options.
Source§impl TryFromJson for LenientLangTagBuf
 
impl TryFromJson for LenientLangTagBuf
type Error = InvalidContext
fn try_from_json(value: Value) -> Result<Self, InvalidContext>
impl Eq for LenientLangTagBuf
Auto Trait Implementations§
impl Freeze for LenientLangTagBuf
impl RefUnwindSafe for LenientLangTagBuf
impl Send for LenientLangTagBuf
impl Sync for LenientLangTagBuf
impl Unpin for LenientLangTagBuf
impl UnwindSafe for LenientLangTagBuf
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
Source§impl<T> BorrowUnordered for T
 
impl<T> BorrowUnordered for T
fn as_unordered(&self) -> &Unordered<T>
Source§impl<T> CallHasher for T
 
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
Source§impl<Q, K> Comparable<K> for Q
 
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
fn equivalent(&self, key: &K) -> bool
Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.