Struct rio_api::model::GeneralizedQuad
source ·
[−]pub struct GeneralizedQuad<'a> {
pub subject: GeneralizedTerm<'a>,
pub predicate: GeneralizedTerm<'a>,
pub object: GeneralizedTerm<'a>,
pub graph_name: Option<GeneralizedTerm<'a>>,
}
Expand description
A generalized RDF triple in a RDF dataset.
The default string formatter is returning a SPARQL representation.
use rio_api::model::{GeneralizedQuad, Variable};
assert_eq!(
"?s ?p ?o .",
GeneralizedQuad {
subject: Variable { name: "s" }.into(),
predicate: Variable { name: "p" }.into(),
object: Variable { name: "o" }.into(),
graph_name: None,
}.to_string()
);
assert_eq!(
"GRAPH ?g { ?s ?p ?o .}",
GeneralizedQuad {
subject: Variable { name: "s" }.into(),
predicate: Variable { name: "p" }.into(),
object: Variable { name: "o" }.into(),
graph_name: Some(Variable { name: "g" }.into()),
}.to_string()
);
Using it requires to enable the generalized
feature.
Fields
subject: GeneralizedTerm<'a>
predicate: GeneralizedTerm<'a>
object: GeneralizedTerm<'a>
graph_name: Option<GeneralizedTerm<'a>>
Trait Implementations
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
type Term = GeneralizedTerm<'a>
Triple
adapter owning this quad.
👎 Deprecated since 0.6.3:
Has been renamed to wrap_as_triple
Iterator over the components of this triple
type Error = StrictRdfError
type Error = StrictRdfError
The type returned in the event of a conversion error.
Performs the conversion.
type Error = StrictRdfError
type Error = StrictRdfError
The type returned in the event of a conversion error.
Performs the conversion.
Auto Trait Implementations
impl<'a> RefUnwindSafe for GeneralizedQuad<'a>
impl<'a> Send for GeneralizedQuad<'a>
impl<'a> Sync for GeneralizedQuad<'a>
impl<'a> Unpin for GeneralizedQuad<'a>
impl<'a> UnwindSafe for GeneralizedQuad<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more