Struct json_ld_syntax::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) -> (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>§
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
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
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
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<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.