Skip to main content

PatternMatchingGraph

Trait PatternMatchingGraph 

Source
pub trait PatternMatchingGraph: Graph<Predicate = <Self as Graph>::Subject, Object = <Self as Graph>::Subject>
where <Self as Graph>::Subject: Resource,
{ 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§

Source

type TriplePatternMatching<'a, 'p>: Iterator<Item = Triple<&'a Self::Subject, &'a Self::Subject, &'a Self::Subject>> where Self: 'a, Self::Subject: 'p

Pattern-matching iterator.

Required Methods§

Source

fn triple_pattern_matching<'p>( &self, pattern: CanonicalTriplePattern<&'p Self::Subject>, ) -> Self::TriplePatternMatching<'_, 'p>

Returns an iterator over the triples matching pattern.

Provided Methods§

Source

fn contains_triple( &self, triple: Triple<&Self::Subject, &Self::Subject, &Self::Subject>, ) -> bool

Checks whether this graph contains triple.

Source

fn contains_triple_subject(&self, subject: &Self::Subject) -> bool

Checks if the graph contains the given subject.

Source

fn contains_triple_predicate(&self, predicate: &Self::Subject) -> bool

Checks if the graph contains the given predicate.

Source

fn contains_triple_object(&self, object: &Self::Subject) -> bool

Checks if the graph contains the given object.

Source

fn triple_predicates_objects<'p>( &self, subject: &'p Self::Subject, ) -> TriplePredicatesObjects<'_, 'p, Self>

Returns an iterator over all the predicates p matching the triple subject p o present in the graph, for some o.

Source

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".

Implementors§