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 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 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.
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