Enum rio_api::model::GeneralizedTerm
source · 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<GeneralizedTerm<'a>> for GeneralizedTerm<'a>
impl<'a> PartialEq<GeneralizedTerm<'a>> for GeneralizedTerm<'a>
source§fn eq(&self, other: &GeneralizedTerm<'a>) -> bool
fn eq(&self, other: &GeneralizedTerm<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> TryFrom<GeneralizedTerm<'a>> for GraphName<'a>
impl<'a> TryFrom<GeneralizedTerm<'a>> for GraphName<'a>
§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>
§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.