pub enum IdRef<'a> {
Term(&'a str),
Keyword(Keyword),
}Expand description
Borrowed value of the @id entry of a term definition.
Variants§
Term(&'a str)
An IRI, a compact IRI, a blank node identifier or another term of the context.
Keyword(Keyword)
A JSON-LD keyword, which makes the term an alias of that keyword.
Implementations§
Source§impl IdRef<'_>
impl IdRef<'_>
Sourcepub fn is_keyword(&self) -> bool
pub fn is_keyword(&self) -> bool
Checks whether this value is a JSON-LD keyword.
Sourcepub fn is_keyword_like(&self) -> bool
pub fn is_keyword_like(&self) -> bool
Checks whether this value is keyword-like: an @ followed by ASCII
letters. See crate::is_keyword_like.
Trait Implementations§
impl<'a> Copy for IdRef<'a>
impl<'a> Eq for IdRef<'a>
Source§impl<'a> From<IdRef<'a>> for ExpandableRef<'a>
impl<'a> From<IdRef<'a>> for ExpandableRef<'a>
Source§impl<'a> From<IdRef<'a>> for KeyOrKeywordRef<'a>
impl<'a> From<IdRef<'a>> for KeyOrKeywordRef<'a>
Source§impl<'a> Ord for IdRef<'a>
impl<'a> Ord for IdRef<'a>
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl<'a> PartialOrd for IdRef<'a>
impl<'a> PartialOrd for IdRef<'a>
impl<'a> StructuralPartialEq for IdRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for IdRef<'a>
impl<'a> RefUnwindSafe for IdRef<'a>
impl<'a> Send for IdRef<'a>
impl<'a> Sync for IdRef<'a>
impl<'a> Unpin for IdRef<'a>
impl<'a> UnsafeUnpin for IdRef<'a>
impl<'a> UnwindSafe for IdRef<'a>
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
Source§fn as_unordered(&self) -> &Unordered<T>
fn as_unordered(&self) -> &Unordered<T>
Views this value as an
Unordered reference.impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if
self is equivalent to key.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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more