pub enum GeneralizedTerm<'a> {
NamedNode(NamedNode<'a>),
BlankNode(BlankNode<'a>),
Literal(Literal<'a>),
Variable(Variable<'a>),
Triple(&'a [GeneralizedTerm<'a>; 3]),
}
Expand description
A generalized RDF term.
It is the union of
- IRI references (absolute or relative),
- blank nodes
- literals and
- variables.
- quoted triples
The default string formatter is returning an N-Triples, Turtle and SPARQL compatible representation.
Using it requires to enable the generalized
feature.
Variants§
NamedNode(NamedNode<'a>)
BlankNode(BlankNode<'a>)
Literal(Literal<'a>)
Variable(Variable<'a>)
Triple(&'a [GeneralizedTerm<'a>; 3])
Trait Implementations§
Source§impl<'a> Clone for GeneralizedTerm<'a>
impl<'a> Clone for GeneralizedTerm<'a>
Source§fn clone(&self) -> GeneralizedTerm<'a>
fn clone(&self) -> GeneralizedTerm<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for GeneralizedTerm<'a>
impl<'a> Debug for GeneralizedTerm<'a>
Source§impl<'a> Display for GeneralizedTerm<'a>
impl<'a> Display for GeneralizedTerm<'a>
Source§impl<'a> From<BlankNode<'a>> for GeneralizedTerm<'a>
impl<'a> From<BlankNode<'a>> for GeneralizedTerm<'a>
Source§fn from(other: BlankNode<'a>) -> GeneralizedTerm<'a>
fn from(other: BlankNode<'a>) -> GeneralizedTerm<'a>
Converts to this type from the input type.
Source§impl<'a> From<GraphName<'a>> for GeneralizedTerm<'a>
impl<'a> From<GraphName<'a>> for GeneralizedTerm<'a>
Source§fn from(other: GraphName<'a>) -> GeneralizedTerm<'a>
fn from(other: GraphName<'a>) -> GeneralizedTerm<'a>
Converts to this type from the input type.
Source§impl<'a> From<Literal<'a>> for GeneralizedTerm<'a>
impl<'a> From<Literal<'a>> for GeneralizedTerm<'a>
Source§fn from(other: Literal<'a>) -> GeneralizedTerm<'a>
fn from(other: Literal<'a>) -> GeneralizedTerm<'a>
Converts to this type from the input type.
Source§impl<'a> From<NamedNode<'a>> for GeneralizedTerm<'a>
impl<'a> From<NamedNode<'a>> for GeneralizedTerm<'a>
Source§fn from(other: NamedNode<'a>) -> GeneralizedTerm<'a>
fn from(other: NamedNode<'a>) -> GeneralizedTerm<'a>
Converts to this type from the input type.
Source§impl<'a> From<Variable<'a>> for GeneralizedTerm<'a>
impl<'a> From<Variable<'a>> for GeneralizedTerm<'a>
Source§fn from(other: Variable<'a>) -> GeneralizedTerm<'a>
fn from(other: Variable<'a>) -> GeneralizedTerm<'a>
Converts to this type from the input type.
Source§impl<'a> Hash for GeneralizedTerm<'a>
impl<'a> Hash for GeneralizedTerm<'a>
Source§impl<'a> PartialEq for GeneralizedTerm<'a>
impl<'a> PartialEq for GeneralizedTerm<'a>
Source§impl<'a> TryFrom<GeneralizedTerm<'a>> for GraphName<'a>
impl<'a> TryFrom<GeneralizedTerm<'a>> for GraphName<'a>
Source§type Error = StrictRdfError
type Error = StrictRdfError
The type returned in the event of a conversion error.
Source§fn try_from(other: GeneralizedTerm<'a>) -> Result<GraphName<'a>, StrictRdfError>
fn try_from(other: GeneralizedTerm<'a>) -> Result<GraphName<'a>, StrictRdfError>
Performs the conversion.
Source§impl<'a> TryFrom<GeneralizedTerm<'a>> for NamedNode<'a>
impl<'a> TryFrom<GeneralizedTerm<'a>> for NamedNode<'a>
Source§type Error = StrictRdfError
type Error = StrictRdfError
The type returned in the event of a conversion error.
Source§fn try_from(other: GeneralizedTerm<'a>) -> Result<NamedNode<'a>, StrictRdfError>
fn try_from(other: GeneralizedTerm<'a>) -> Result<NamedNode<'a>, StrictRdfError>
Performs the conversion.
impl<'a> Copy for GeneralizedTerm<'a>
impl<'a> Eq for GeneralizedTerm<'a>
impl<'a> StructuralPartialEq for GeneralizedTerm<'a>
Auto Trait Implementations§
impl<'a> Freeze for GeneralizedTerm<'a>
impl<'a> RefUnwindSafe for GeneralizedTerm<'a>
impl<'a> Send for GeneralizedTerm<'a>
impl<'a> Sync for GeneralizedTerm<'a>
impl<'a> Unpin for GeneralizedTerm<'a>
impl<'a> UnwindSafe for GeneralizedTerm<'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