pub enum TermRef<'a> {
NamedNode(NamedNodeRef<'a>),
BlankNode(BlankNodeRef<'a>),
Literal(LiteralRef<'a>),
}
Expand description
A borrowed RDF term
It is the union of IRIs, blank nodes, literals and triples (if the rdf-12
feature is enabled).
Variants§
Implementations§
Source§impl TermRef<'_>
impl TermRef<'_>
pub fn is_named_node(&self) -> bool
pub fn is_blank_node(&self) -> bool
pub fn is_literal(&self) -> bool
pub fn into_owned(self) -> Term
Trait Implementations§
Source§impl<'a> From<&'a NamedOrBlankNode> for TermRef<'a>
impl<'a> From<&'a NamedOrBlankNode> for TermRef<'a>
Source§fn from(node: &'a NamedOrBlankNode) -> TermRef<'a>
fn from(node: &'a NamedOrBlankNode) -> TermRef<'a>
Converts to this type from the input type.
Source§impl<'a> From<BlankNodeRef<'a>> for TermRef<'a>
impl<'a> From<BlankNodeRef<'a>> for TermRef<'a>
Source§fn from(node: BlankNodeRef<'a>) -> TermRef<'a>
fn from(node: BlankNodeRef<'a>) -> TermRef<'a>
Converts to this type from the input type.
Source§impl<'a> From<LiteralRef<'a>> for TermRef<'a>
impl<'a> From<LiteralRef<'a>> for TermRef<'a>
Source§fn from(literal: LiteralRef<'a>) -> TermRef<'a>
fn from(literal: LiteralRef<'a>) -> TermRef<'a>
Converts to this type from the input type.
Source§impl<'a> From<NamedNodeRef<'a>> for TermRef<'a>
impl<'a> From<NamedNodeRef<'a>> for TermRef<'a>
Source§fn from(node: NamedNodeRef<'a>) -> TermRef<'a>
fn from(node: NamedNodeRef<'a>) -> TermRef<'a>
Converts to this type from the input type.
Source§impl<'a> From<NamedOrBlankNodeRef<'a>> for TermRef<'a>
impl<'a> From<NamedOrBlankNodeRef<'a>> for TermRef<'a>
Source§fn from(node: NamedOrBlankNodeRef<'a>) -> TermRef<'a>
fn from(node: NamedOrBlankNodeRef<'a>) -> TermRef<'a>
Converts to this type from the input type.
Source§impl From<TermRef<'_>> for PlainTermScalar
impl From<TermRef<'_>> for PlainTermScalar
Source§fn from(term: TermRef<'_>) -> PlainTermScalar
fn from(term: TermRef<'_>) -> PlainTermScalar
Converts to this type from the input type.
Source§impl<'data> TryFrom<TermRef<'data>> for TypedValueRef<'data>
impl<'data> TryFrom<TermRef<'data>> for TypedValueRef<'data>
Source§type Error = TermToTypedValueError
type Error = TermToTypedValueError
The type returned in the event of a conversion error.
Source§fn try_from(
value: TermRef<'data>,
) -> Result<TypedValueRef<'data>, <TypedValueRef<'data> as TryFrom<TermRef<'data>>>::Error>
fn try_from( value: TermRef<'data>, ) -> Result<TypedValueRef<'data>, <TypedValueRef<'data> as TryFrom<TermRef<'data>>>::Error>
Performs the conversion.
impl<'a> Copy for TermRef<'a>
impl<'a> Eq for TermRef<'a>
impl<'a> StructuralPartialEq for TermRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for TermRef<'a>
impl<'a> RefUnwindSafe for TermRef<'a>
impl<'a> Send for TermRef<'a>
impl<'a> Sync for TermRef<'a>
impl<'a> Unpin for TermRef<'a>
impl<'a> UnwindSafe for TermRef<'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> 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§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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more