Enum json_ld::LenientLanguageTagBuf
source · Expand description
Language tag buffer that may not be well-formed.
Variants§
Implementations§
source§impl LenientLanguageTagBuf
impl LenientLanguageTagBuf
pub fn new(s: String) -> (LenientLanguageTagBuf, Option<Error>)
pub fn is_well_formed(&self) -> bool
pub fn as_ref(&self) -> LenientLanguageTag<'_>
pub fn as_language_tag(&self) -> Option<LanguageTag<'_, [u8]>>
pub fn as_str(&self) -> &str
pub fn into_string(self) -> String
Trait Implementations§
source§impl Clone for LenientLanguageTagBuf
impl Clone for LenientLanguageTagBuf
source§fn clone(&self) -> LenientLanguageTagBuf
fn clone(&self) -> LenientLanguageTagBuf
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 LenientLanguageTagBuf
impl Debug for LenientLanguageTagBuf
source§impl Display for LenientLanguageTagBuf
impl Display for LenientLanguageTagBuf
source§impl From<String> for LenientLanguageTagBuf
impl From<String> for LenientLanguageTagBuf
source§fn from(tag: String) -> LenientLanguageTagBuf
fn from(tag: String) -> LenientLanguageTagBuf
Converts to this type from the input type.
source§impl Hash for LenientLanguageTagBuf
impl Hash for LenientLanguageTagBuf
source§impl<M> IntoJsonMeta<M> for LenientLanguageTagBuf
impl<M> IntoJsonMeta<M> for LenientLanguageTagBuf
fn into_json_meta(self, meta: M) -> Meta<Value<M>, M>
source§impl Ord for LenientLanguageTagBuf
impl Ord for LenientLanguageTagBuf
source§fn cmp(&self, other: &LenientLanguageTagBuf) -> Ordering
fn cmp(&self, other: &LenientLanguageTagBuf) -> 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<LenientLanguageTagBuf> for LenientLanguageTagBuf
impl PartialEq<LenientLanguageTagBuf> for LenientLanguageTagBuf
source§fn eq(&self, other: &LenientLanguageTagBuf) -> bool
fn eq(&self, other: &LenientLanguageTagBuf) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<LenientLanguageTagBuf> for LenientLanguageTagBuf
impl PartialOrd<LenientLanguageTagBuf> for LenientLanguageTagBuf
source§fn partial_cmp(&self, other: &LenientLanguageTagBuf) -> Option<Ordering>
fn partial_cmp(&self, other: &LenientLanguageTagBuf) -> 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 StrippedPartialEq<LenientLanguageTagBuf> for LenientLanguageTagBuf
impl StrippedPartialEq<LenientLanguageTagBuf> for LenientLanguageTagBuf
fn stripped_eq(&self, other: &LenientLanguageTagBuf) -> bool
source§impl<M> TryFromStrippedJson<M> for LenientLanguageTagBuf
impl<M> TryFromStrippedJson<M> for LenientLanguageTagBuf
fn try_from_stripped_json(
value: Value<M>
) -> Result<LenientLanguageTagBuf, InvalidContext>
impl Eq for LenientLanguageTagBuf
impl StructuralEq for LenientLanguageTagBuf
impl StructuralPartialEq for LenientLanguageTagBuf
Auto Trait Implementations§
impl RefUnwindSafe for LenientLanguageTagBuf
impl Send for LenientLanguageTagBuf
impl Sync for LenientLanguageTagBuf
impl Unpin for LenientLanguageTagBuf
impl UnwindSafe for LenientLanguageTagBuf
Blanket Implementations§
source§impl<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
§impl<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
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
source§impl<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,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.