pub trait PatternMatchingGraph: Graph {
type TriplePatternMatching<'a, 'p>: Iterator<Item = Triple<&'a Self::Resource>>
where Self: 'a,
Self::Resource: 'p;
// Required method
fn triple_pattern_matching<'p>(
&self,
pattern: CanonicalTriplePattern<&'p Self::Resource>,
) -> Self::TriplePatternMatching<'_, 'p>;
// Provided methods
fn contains_triple(&self, triple: Triple<&Self::Resource>) -> bool { ... }
fn contains_triple_subject(&self, subject: &Self::Resource) -> bool { ... }
fn contains_triple_predicate(&self, predicate: &Self::Resource) -> bool { ... }
fn contains_triple_object(&self, object: &Self::Resource) -> bool { ... }
fn triple_predicates_objects<'p>(
&self,
subject: &'p Self::Resource,
) -> TriplePredicatesObjects<'_, 'p, Self> ⓘ
where Self: PredicateTraversableGraph { ... }
fn triple_objects<'p>(
&self,
subject: &'p Self::Resource,
predicate: &'p Self::Resource,
) -> TripleObjects<'_, 'p, Self> ⓘ { ... }
}
Expand description
Pattern-matching-capable dataset.
Required Associated Types§
type TriplePatternMatching<'a, 'p>: Iterator<Item = Triple<&'a Self::Resource>> where Self: 'a, Self::Resource: 'p
Required Methods§
fn triple_pattern_matching<'p>( &self, pattern: CanonicalTriplePattern<&'p Self::Resource>, ) -> Self::TriplePatternMatching<'_, 'p>
Provided Methods§
fn contains_triple(&self, triple: Triple<&Self::Resource>) -> bool
Sourcefn contains_triple_subject(&self, subject: &Self::Resource) -> bool
fn contains_triple_subject(&self, subject: &Self::Resource) -> bool
Checks if the graph contains the given subject.
Sourcefn contains_triple_predicate(&self, predicate: &Self::Resource) -> bool
fn contains_triple_predicate(&self, predicate: &Self::Resource) -> bool
Checks if the graph contains the given predicate.
Sourcefn contains_triple_object(&self, object: &Self::Resource) -> bool
fn contains_triple_object(&self, object: &Self::Resource) -> bool
Checks if the graph contains the given object.
Sourcefn triple_predicates_objects<'p>(
&self,
subject: &'p Self::Resource,
) -> TriplePredicatesObjects<'_, 'p, Self> ⓘwhere
Self: PredicateTraversableGraph,
fn triple_predicates_objects<'p>(
&self,
subject: &'p Self::Resource,
) -> TriplePredicatesObjects<'_, 'p, Self> ⓘwhere
Self: PredicateTraversableGraph,
Returns an iterator over all the predicates p
matching the triple subject p o
present in the graph, for some o
.
Sourcefn triple_objects<'p>(
&self,
subject: &'p Self::Resource,
predicate: &'p Self::Resource,
) -> TripleObjects<'_, 'p, Self> ⓘ
fn triple_objects<'p>( &self, subject: &'p Self::Resource, predicate: &'p Self::Resource, ) -> TripleObjects<'_, 'p, Self> ⓘ
Returns an iterator over all the objects o
matching the triple subject predicate o
present in the graph.
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.