pub trait PatternMatchingGraph: Graph<Predicate = <Self as Graph>::Subject, Object = <Self as Graph>::Subject>{
type TriplePatternMatching<'a, 'p>: Iterator<Item = Triple<&'a Self::Subject, &'a Self::Subject, &'a Self::Subject>>
where Self: 'a,
Self::Subject: 'p;
// Required method
fn triple_pattern_matching<'p>(
&self,
pattern: CanonicalTriplePattern<&'p Self::Subject>,
) -> Self::TriplePatternMatching<'_, 'p>;
// Provided methods
fn contains_triple(
&self,
triple: Triple<&Self::Subject, &Self::Subject, &Self::Subject>,
) -> bool { ... }
fn contains_triple_subject(&self, subject: &Self::Subject) -> bool { ... }
fn contains_triple_predicate(&self, predicate: &Self::Subject) -> bool { ... }
fn contains_triple_object(&self, object: &Self::Subject) -> bool { ... }
fn triple_predicates_objects<'p>(
&self,
subject: &'p Self::Subject,
) -> TriplePredicatesObjects<'_, 'p, Self> ⓘ
where Self: PredicateTraversableGraph { ... }
fn triple_objects<'p>(
&self,
subject: &'p Self::Subject,
predicate: &'p Self::Subject,
) -> TripleObjects<'_, 'p, Self> ⓘ { ... }
}Expand description
Pattern-matching-capable graph. Restricted to uniform graphs whose
resource type implements Resource (granting all four position traits).
Required Associated Types§
Required Methods§
Sourcefn triple_pattern_matching<'p>(
&self,
pattern: CanonicalTriplePattern<&'p Self::Subject>,
) -> Self::TriplePatternMatching<'_, 'p>
fn triple_pattern_matching<'p>( &self, pattern: CanonicalTriplePattern<&'p Self::Subject>, ) -> Self::TriplePatternMatching<'_, 'p>
Returns an iterator over the triples matching pattern.
Provided Methods§
Sourcefn contains_triple(
&self,
triple: Triple<&Self::Subject, &Self::Subject, &Self::Subject>,
) -> bool
fn contains_triple( &self, triple: Triple<&Self::Subject, &Self::Subject, &Self::Subject>, ) -> bool
Checks whether this graph contains triple.
Sourcefn contains_triple_subject(&self, subject: &Self::Subject) -> bool
fn contains_triple_subject(&self, subject: &Self::Subject) -> bool
Checks if the graph contains the given subject.
Sourcefn contains_triple_predicate(&self, predicate: &Self::Subject) -> bool
fn contains_triple_predicate(&self, predicate: &Self::Subject) -> bool
Checks if the graph contains the given predicate.
Sourcefn contains_triple_object(&self, object: &Self::Subject) -> bool
fn contains_triple_object(&self, object: &Self::Subject) -> bool
Checks if the graph contains the given object.
Sourcefn triple_predicates_objects<'p>(
&self,
subject: &'p Self::Subject,
) -> TriplePredicatesObjects<'_, 'p, Self> ⓘwhere
Self: PredicateTraversableGraph,
fn triple_predicates_objects<'p>(
&self,
subject: &'p Self::Subject,
) -> 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::Subject,
predicate: &'p Self::Subject,
) -> TripleObjects<'_, 'p, Self> ⓘ
fn triple_objects<'p>( &self, subject: &'p Self::Subject, predicate: &'p Self::Subject, ) -> 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".