pub enum KeyOrKeyword {
Keyword(Keyword),
Key(Key),
}Expand description
Context definition key that may also be a JSON-LD keyword.
Variants§
Implementations§
Source§impl KeyOrKeyword
impl KeyOrKeyword
Sourcepub fn into_keyword(self) -> Option<Keyword>
pub fn into_keyword(self) -> Option<Keyword>
Returns the keyword, or None if this is a term key.
Sourcepub fn as_keyword(&self) -> Option<Keyword>
pub fn as_keyword(&self) -> Option<Keyword>
Returns the keyword, or None if this is a term key.
Trait Implementations§
Source§impl Clone for KeyOrKeyword
impl Clone for KeyOrKeyword
Source§impl Display for KeyOrKeyword
impl Display for KeyOrKeyword
impl Eq for KeyOrKeyword
Source§impl<'a> From<&'a KeyOrKeyword> for KeyOrKeywordRef<'a>
impl<'a> From<&'a KeyOrKeyword> for KeyOrKeywordRef<'a>
Source§fn from(k: &'a KeyOrKeyword) -> Self
fn from(k: &'a KeyOrKeyword) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a KeyOrKeyword> for ExpandableRef<'a>
impl<'a> From<&'a KeyOrKeyword> for ExpandableRef<'a>
Source§fn from(k: &'a KeyOrKeyword) -> Self
fn from(k: &'a KeyOrKeyword) -> Self
Converts to this type from the input type.
Source§impl Hash for KeyOrKeyword
impl Hash for KeyOrKeyword
Source§impl Ord for KeyOrKeyword
impl Ord for KeyOrKeyword
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 PartialEq for KeyOrKeyword
impl PartialEq for KeyOrKeyword
Source§impl PartialOrd for KeyOrKeyword
impl PartialOrd for KeyOrKeyword
impl StructuralPartialEq for KeyOrKeyword
Auto Trait Implementations§
impl Freeze for KeyOrKeyword
impl RefUnwindSafe for KeyOrKeyword
impl Send for KeyOrKeyword
impl Sync for KeyOrKeyword
impl Unpin for KeyOrKeyword
impl UnsafeUnpin for KeyOrKeyword
impl UnwindSafe for KeyOrKeyword
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