pub enum Term<T = IriBuf, B = BlankIdBuf> {
Null,
Id(Id<T, B>),
Keyword(Keyword),
}Expand description
Identifier, keyword or @null.
Variants§
Implementations§
Source§impl<I, B> Term<I, B>
impl<I, B> Term<I, B>
Sourcepub fn into_iri(self) -> Result<I, Self>
pub fn into_iri(self) -> Result<I, Self>
Turns this term into an IRI if possible.
If it is not an IRI, returns the term itself.
§Errors
Returns self unchanged when the value is not an IRI.
Sourcepub fn is_keyword(&self) -> bool
pub fn is_keyword(&self) -> bool
Checks if this term is a keyword.
Trait Implementations§
Source§impl<T, B, N: Vocabulary<Iri = T, BlankId = B>> AsRefWithContext<str, N> for Term<T, B>
impl<T, B, N: Vocabulary<Iri = T, BlankId = B>> AsRefWithContext<str, N> for Term<T, B>
fn as_ref_with<'a>(&'a self, vocabulary: &'a N) -> &'a str
Source§impl<T, B, N: Vocabulary<Iri = T, BlankId = B>> DisplayWithContext<N> for Term<T, B>
impl<T, B, N: Vocabulary<Iri = T, BlankId = B>> DisplayWithContext<N> for Term<T, B>
impl<T: Eq, B: Eq> Eq for Term<T, B>
impl<T: PartialEq, B: PartialEq> StructuralPartialEq for Term<T, B>
Auto Trait Implementations§
impl<T, B> Freeze for Term<T, B>
impl<T, B> RefUnwindSafe for Term<T, B>where
Id<T, B>: RefUnwindSafe,
impl<T, B> Send for Term<T, B>
impl<T, B> Sync for Term<T, B>
impl<T, B> Unpin for Term<T, B>
impl<T, B> UnsafeUnpin for Term<T, B>where
Id<T, B>: UnsafeUnpin,
impl<T, B> UnwindSafe for Term<T, B>where
Id<T, B>: UnwindSafe,
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> 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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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>,
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
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