pub enum Term {
NamedNode(NamedNode),
BlankNode(BlankNode),
Literal(Literal),
Triple(Box<Triple>),
}
Expand description
An owned RDF term
It is the union of IRIs, blank nodes, literals and triples (if the rdf-star
feature is enabled).
Variants§
Implementations§
Trait Implementations§
Source§impl From<BlankNodeRef<'_>> for Term
impl From<BlankNodeRef<'_>> for Term
Source§fn from(node: BlankNodeRef<'_>) -> Self
fn from(node: BlankNodeRef<'_>) -> Self
Converts to this type from the input type.
Source§impl From<LiteralRef<'_>> for Term
impl From<LiteralRef<'_>> for Term
Source§fn from(literal: LiteralRef<'_>) -> Self
fn from(literal: LiteralRef<'_>) -> Self
Converts to this type from the input type.
Source§impl From<NamedNodeRef<'_>> for Term
impl From<NamedNodeRef<'_>> for Term
Source§fn from(node: NamedNodeRef<'_>) -> Self
fn from(node: NamedNodeRef<'_>) -> Self
Converts to this type from the input type.
Source§impl From<NamedOrBlankNode> for Term
impl From<NamedOrBlankNode> for Term
Source§fn from(node: NamedOrBlankNode) -> Self
fn from(node: NamedOrBlankNode) -> Self
Converts to this type from the input type.
Source§impl From<NamedOrBlankNodeRef<'_>> for Term
impl From<NamedOrBlankNodeRef<'_>> for Term
Source§fn from(node: NamedOrBlankNodeRef<'_>) -> Self
fn from(node: NamedOrBlankNodeRef<'_>) -> Self
Converts to this type from the input type.
Source§impl From<SubjectRef<'_>> for Term
impl From<SubjectRef<'_>> for Term
Source§fn from(node: SubjectRef<'_>) -> Self
fn from(node: SubjectRef<'_>) -> Self
Converts to this type from the input type.
Source§impl FromStr for Term
impl FromStr for Term
Source§fn from_str(s: &str) -> Result<Self, Self::Err>
fn from_str(s: &str) -> Result<Self, Self::Err>
Parses a term from its NTriples serialization
use oxrdf::*;
use std::str::FromStr;
assert_eq!(
Term::from_str("\"ex\"")?,
Literal::new_simple_literal("ex").into()
);
Source§type Err = TermParseError
type Err = TermParseError
The associated error which can be returned from parsing.
impl Eq for Term
impl StructuralPartialEq for Term
Auto Trait Implementations§
impl Freeze for Term
impl RefUnwindSafe for Term
impl Send for Term
impl Sync for Term
impl Unpin for Term
impl UnwindSafe for Term
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