Struct json_ld::LenientLangTagBuf 
source · 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) -> (LenientLangTagBuf, 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>§
pub fn as_bytes(&self) -> &[u8] ⓘ
pub fn as_str(&self) -> &str
pub fn is_well_formed(&self) -> bool
pub fn as_well_formed(&self) -> Option<&LangTag>
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 copy 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
§type Target = LenientLangTag
 
type Target = LenientLangTag
The resulting type after dereferencing.
source§impl<'de> Deserialize<'de> for LenientLangTagBuf
 
impl<'de> Deserialize<'de> for LenientLangTagBuf
source§fn deserialize<D>(
    deserializer: D,
) -> Result<LenientLangTagBuf, <D as Deserializer<'de>>::Error>where
    D: Deserializer<'de>,
 
fn deserialize<D>(
    deserializer: D,
) -> Result<LenientLangTagBuf, <D as Deserializer<'de>>::Error>where
    D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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) -> LenientLangTagBuf
 
fn from(tag: LangTagBuf) -> LenientLangTagBuf
Converts to this type from the input type.
source§impl From<String> for LenientLangTagBuf
 
impl From<String> for LenientLangTagBuf
source§fn from(tag: String) -> LenientLangTagBuf
 
fn from(tag: String) -> LenientLangTagBuf
Converts to this type from the input type.
source§impl Hash for LenientLangTagBuf
 
impl Hash for LenientLangTagBuf
source§impl Ord for LenientLangTagBuf
 
impl Ord for LenientLangTagBuf
source§fn cmp(&self, other: &LenientLangTagBuf) -> Ordering
 
fn cmp(&self, other: &LenientLangTagBuf) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
    Self: Sized,
 
fn max(self, other: Self) -> Selfwhere
    Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for LenientLangTagBuf
 
impl PartialEq for LenientLangTagBuf
source§fn eq(&self, other: &LenientLangTagBuf) -> bool
 
fn eq(&self, other: &LenientLangTagBuf) -> bool
This method tests for 
self and other values to be equal, and is used
by ==.source§impl PartialOrd for LenientLangTagBuf
 
impl PartialOrd for LenientLangTagBuf
source§fn partial_cmp(&self, other: &LenientLangTagBuf) -> Option<Ordering>
 
fn partial_cmp(&self, other: &LenientLangTagBuf) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
 
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for 
self and other) and is used by the <=
operator. Read moresource§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<(), Error>
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 Serialize for LenientLangTagBuf
 
impl Serialize for LenientLangTagBuf
source§fn serialize<S>(
    &self,
    serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
    S: Serializer,
 
fn serialize<S>(
    &self,
    serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
    S: Serializer,
Serialize this value into the given Serde serializer. Read more
source§impl TryFromJson for LenientLangTagBuf
 
impl TryFromJson for LenientLangTagBuf
type Error = InvalidContext
fn try_from_json(value: Value) -> Result<LenientLangTagBuf, 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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
 
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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
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.