pub enum TermRef<'a> {
NamedNode(NamedNodeRef<'a>),
BlankNode(BlankNodeRef<'a>),
Literal(LiteralRef<'a>),
Triple(&'a Triple),
}
Expand description
A borrowed RDF term
It is the union of IRIs, blank nodes, literals and triples (if the rdf-star
feature is enabled).
Variants§
Implementations§
source§impl<'a> TermRef<'a>
impl<'a> TermRef<'a>
pub fn is_named_node(&self) -> bool
pub fn is_blank_node(&self) -> bool
pub fn is_literal(&self) -> bool
pub fn is_triple(&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) -> Self
fn from(node: &'a NamedOrBlankNode) -> Self
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>) -> Self
fn from(node: BlankNodeRef<'a>) -> Self
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>) -> Self
fn from(literal: LiteralRef<'a>) -> Self
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>) -> Self
fn from(node: NamedNodeRef<'a>) -> Self
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>) -> Self
fn from(node: NamedOrBlankNodeRef<'a>) -> Self
Converts to this type from the input type.
source§impl<'a> From<SubjectRef<'a>> for TermRef<'a>
impl<'a> From<SubjectRef<'a>> for TermRef<'a>
source§fn from(node: SubjectRef<'a>) -> Self
fn from(node: SubjectRef<'a>) -> Self
Converts to this type from the input type.