Enum json_ld::LenientLanguageTagBuf
source · [−]Expand description
Language tag buffer that may not be well-formed.
Variants
WellFormed(LanguageTagBuf<Vec<u8, Global>>)
Malformed(String)
Implementations
sourceimpl 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
sourceimpl Clone for LenientLanguageTagBuf
impl Clone for LenientLanguageTagBuf
sourcefn clone(&self) -> LenientLanguageTagBuf
fn clone(&self) -> LenientLanguageTagBuf
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 Debug for LenientLanguageTagBuf
impl Debug for LenientLanguageTagBuf
sourceimpl Display for LenientLanguageTagBuf
impl Display for LenientLanguageTagBuf
sourceimpl From<String> for LenientLanguageTagBuf
impl From<String> for LenientLanguageTagBuf
sourcefn from(tag: String) -> LenientLanguageTagBuf
fn from(tag: String) -> LenientLanguageTagBuf
Converts to this type from the input type.
sourceimpl Hash for LenientLanguageTagBuf
impl Hash for LenientLanguageTagBuf
sourceimpl<M> IntoJsonMeta<M> for LenientLanguageTagBuf
impl<M> IntoJsonMeta<M> for LenientLanguageTagBuf
fn into_json_meta(self, meta: M) -> Meta<Value<M>, M>
sourceimpl Ord for LenientLanguageTagBuf
impl Ord for LenientLanguageTagBuf
sourcefn cmp(&self, other: &LenientLanguageTagBuf) -> Ordering
fn cmp(&self, other: &LenientLanguageTagBuf) -> Ordering
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<LenientLanguageTagBuf> for LenientLanguageTagBuf
impl PartialEq<LenientLanguageTagBuf> for LenientLanguageTagBuf
sourcefn eq(&self, other: &LenientLanguageTagBuf) -> bool
fn eq(&self, other: &LenientLanguageTagBuf) -> bool
sourceimpl PartialOrd<LenientLanguageTagBuf> for LenientLanguageTagBuf
impl PartialOrd<LenientLanguageTagBuf> for LenientLanguageTagBuf
sourcefn partial_cmp(&self, other: &LenientLanguageTagBuf) -> Option<Ordering>
fn partial_cmp(&self, other: &LenientLanguageTagBuf) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const 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 moresourceimpl StrippedPartialEq<LenientLanguageTagBuf> for LenientLanguageTagBuf
impl StrippedPartialEq<LenientLanguageTagBuf> for LenientLanguageTagBuf
fn stripped_eq(&self, other: &LenientLanguageTagBuf) -> bool
sourceimpl<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
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.