pub trait Quad: Sized {
type Term: Term;
Show 14 methods
// Required methods
fn s(&self) -> QBorrowTerm<'_, Self>;
fn p(&self) -> QBorrowTerm<'_, Self>;
fn o(&self) -> QBorrowTerm<'_, Self>;
fn g(&self) -> GraphName<QBorrowTerm<'_, Self>>;
fn to_spog(self) -> Spog<Self::Term>;
// Provided methods
fn spog(&self) -> Spog<QBorrowTerm<'_, Self>> { ... }
fn to_s(self) -> Self::Term { ... }
fn to_p(self) -> Self::Term { ... }
fn to_o(self) -> Self::Term { ... }
fn to_g(self) -> GraphName<Self::Term> { ... }
fn matched_by<S, P, O, G>(&self, sm: S, pm: P, om: O, gm: G) -> bool
where S: TermMatcher,
P: TermMatcher,
O: TermMatcher,
G: GraphNameMatcher { ... }
fn eq<T: Quad>(&self, other: T) -> bool { ... }
fn eq_spog<S: Term, P: Term, O: Term, G: Term>(
&self,
s: S,
p: P,
o: O,
g: GraphName<G>,
) -> bool { ... }
fn into_triple(self) -> [Self::Term; 3] { ... }
}
Expand description
This trait represents an abstract RDF quad, and provide convenient methods for working with quads.
Required Associated Types§
Required Methods§
Sourcefn s(&self) -> QBorrowTerm<'_, Self>
fn s(&self) -> QBorrowTerm<'_, Self>
The subject of this quad.
Sourcefn p(&self) -> QBorrowTerm<'_, Self>
fn p(&self) -> QBorrowTerm<'_, Self>
The predicate of this quad.
Sourcefn o(&self) -> QBorrowTerm<'_, Self>
fn o(&self) -> QBorrowTerm<'_, Self>
The object of this quad.
Sourcefn g(&self) -> GraphName<QBorrowTerm<'_, Self>>
fn g(&self) -> GraphName<QBorrowTerm<'_, Self>>
The graph name of this quad.
None
means that this quad belongs to the default graph of the dataset.
Sourcefn to_spog(self) -> Spog<Self::Term>
fn to_spog(self) -> Spog<Self::Term>
Consume this quad, returning all its components.
See also Quad::spog
.
Provided Methods§
Sourcefn spog(&self) -> Spog<QBorrowTerm<'_, Self>>
fn spog(&self) -> Spog<QBorrowTerm<'_, Self>>
The four components of this quad, as a quad of borrowed terms.
See also Quad::to_spog
.
Sourcefn matched_by<S, P, O, G>(&self, sm: S, pm: P, om: O, gm: G) -> bool
fn matched_by<S, P, O, G>(&self, sm: S, pm: P, om: O, gm: G) -> bool
Checks that the constituents terms of this quad match the respective matchers.
Sourcefn eq<T: Quad>(&self, other: T) -> bool
fn eq<T: Quad>(&self, other: T) -> bool
Check whether other
is term-wise equal (using Term::eq
) to self
.
See also eq_spog
, matched_by
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.