pub trait PatternMatchingDataset: Dataset {
type QuadPatternMatching<'a, 'p>: Iterator<Item = Quad<&'a Self::Resource>>
where Self: 'a,
Self::Resource: 'p;
// Required method
fn quad_pattern_matching<'p>(
&self,
pattern: Quad<Option<&'p Self::Resource>>,
) -> Self::QuadPatternMatching<'_, 'p>;
// Provided methods
fn contains_quad(&self, quad: Quad<&Self::Resource>) -> bool { ... }
fn contains_quad_subject(&self, subject: &Self::Resource) -> bool { ... }
fn contains_quad_predicate(&self, predicate: &Self::Resource) -> bool { ... }
fn contains_quad_object(&self, object: &Self::Resource) -> bool { ... }
fn contains_named_graph(&self, named_graph: &Self::Resource) -> bool { ... }
fn quad_predicates_objects<'p>(
&self,
graph: Option<&'p Self::Resource>,
subject: &'p Self::Resource,
) -> QuadPredicatesObjects<'_, 'p, Self> ⓘ
where Self: PredicateFiniteDataset { ... }
fn quad_objects<'p>(
&self,
graph: Option<&'p Self::Resource>,
subject: &'p Self::Resource,
predicate: &'p Self::Resource,
) -> QuadObjects<'_, 'p, Self> ⓘ { ... }
}Expand description
Pattern-matching-capable dataset.
A dataset that can be queried with a LinearQuadPattern, i.e. a quad
where each component is either a fixed resource or left unconstrained.
Required Associated Types§
Required Methods§
Sourcefn quad_pattern_matching<'p>(
&self,
pattern: Quad<Option<&'p Self::Resource>>,
) -> Self::QuadPatternMatching<'_, 'p>
fn quad_pattern_matching<'p>( &self, pattern: Quad<Option<&'p Self::Resource>>, ) -> Self::QuadPatternMatching<'_, 'p>
Returns an iterator over all the quads of the dataset matching the given pattern.
Provided Methods§
Sourcefn contains_quad(&self, quad: Quad<&Self::Resource>) -> bool
fn contains_quad(&self, quad: Quad<&Self::Resource>) -> bool
Checks if the dataset contains the given quad.
Sourcefn contains_quad_subject(&self, subject: &Self::Resource) -> bool
fn contains_quad_subject(&self, subject: &Self::Resource) -> bool
Checks if the dataset contains the given subject.
Sourcefn contains_quad_predicate(&self, predicate: &Self::Resource) -> bool
fn contains_quad_predicate(&self, predicate: &Self::Resource) -> bool
Checks if the dataset contains the given predicate.
Sourcefn contains_quad_object(&self, object: &Self::Resource) -> bool
fn contains_quad_object(&self, object: &Self::Resource) -> bool
Checks if the dataset contains the given object.
Sourcefn contains_named_graph(&self, named_graph: &Self::Resource) -> bool
fn contains_named_graph(&self, named_graph: &Self::Resource) -> bool
Checks if the dataset contains the given named graph.
Sourcefn quad_predicates_objects<'p>(
&self,
graph: Option<&'p Self::Resource>,
subject: &'p Self::Resource,
) -> QuadPredicatesObjects<'_, 'p, Self> ⓘwhere
Self: PredicateFiniteDataset,
fn quad_predicates_objects<'p>(
&self,
graph: Option<&'p Self::Resource>,
subject: &'p Self::Resource,
) -> QuadPredicatesObjects<'_, 'p, Self> ⓘwhere
Self: PredicateFiniteDataset,
Returns an iterator over all the predicates p matching any quad
subject p o graph present in the dataset, for any object o.
Sourcefn quad_objects<'p>(
&self,
graph: Option<&'p Self::Resource>,
subject: &'p Self::Resource,
predicate: &'p Self::Resource,
) -> QuadObjects<'_, 'p, Self> ⓘ
fn quad_objects<'p>( &self, graph: Option<&'p Self::Resource>, subject: &'p Self::Resource, predicate: &'p Self::Resource, ) -> QuadObjects<'_, 'p, Self> ⓘ
Returns an iterator over all the objects o matching the quad subject predicate o graph.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
Source§impl<G> PatternMatchingDataset for Gwhere
G: PatternMatchingGraph,
Any single-graph, pattern-matching-capable graph is a pattern-matching
dataset, matching only quads in the default graph.
impl<G> PatternMatchingDataset for Gwhere
G: PatternMatchingGraph,
Any single-graph, pattern-matching-capable graph is a pattern-matching dataset, matching only quads in the default graph.