Skip to main content

PatternMatchingDataset

Trait PatternMatchingDataset 

Source
pub trait PatternMatchingDataset: Dataset<Graph = <Self as Graph>::Subject> + Graph<Predicate = <Self as Graph>::Subject, Object = <Self as Graph>::Subject>
where <Self as Graph>::Subject: Resource,
{ type QuadPatternMatching<'a, 'p>: Iterator<Item = Quad<&'a Self::Subject, &'a Self::Subject, &'a Self::Subject, &'a Self::Subject>> where Self: 'a, Self::Subject: 'p; // Required method fn quad_pattern_matching<'p>( &self, pattern: CanonicalQuadPattern<&'p Self::Subject>, ) -> Self::QuadPatternMatching<'_, 'p>; // Provided methods fn contains_quad( &self, quad: Quad<&Self::Subject, &Self::Subject, &Self::Subject, &Self::Subject>, ) -> bool { ... } fn contains_quad_subject(&self, subject: &Self::Subject) -> bool { ... } fn contains_quad_predicate(&self, predicate: &Self::Subject) -> bool { ... } fn contains_quad_object(&self, object: &Self::Subject) -> bool { ... } fn contains_named_graph(&self, named_graph: &Self::Subject) -> bool { ... } fn quad_predicates_objects<'p>( &self, graph: Option<&'p Self::Subject>, subject: &'p Self::Subject, ) -> QuadPredicatesObjects<'_, 'p, Self> where Self: PredicateTraversableDataset { ... } fn quad_objects<'p>( &self, graph: Option<&'p Self::Subject>, subject: &'p Self::Subject, predicate: &'p Self::Subject, ) -> QuadObjects<'_, 'p, Self> { ... } }
Expand description

Pattern-matching-capable dataset. Restricted to uniform datasets where every position carries the same resource type.

Required Associated Types§

Source

type QuadPatternMatching<'a, 'p>: Iterator<Item = Quad<&'a Self::Subject, &'a Self::Subject, &'a Self::Subject, &'a Self::Subject>> where Self: 'a, Self::Subject: 'p

Pattern-matching iterator.

Required Methods§

Source

fn quad_pattern_matching<'p>( &self, pattern: CanonicalQuadPattern<&'p Self::Subject>, ) -> Self::QuadPatternMatching<'_, 'p>

Returns an iterator over all the quads of the dataset matching the given pattern.

Provided Methods§

Source

fn contains_quad( &self, quad: Quad<&Self::Subject, &Self::Subject, &Self::Subject, &Self::Subject>, ) -> bool

Checks if the dataset contains the given quad.

Source

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

Checks if the dataset contains the given subject.

Source

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

Checks if the dataset contains the given predicate.

Source

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

Checks if the dataset contains the given object.

Source

fn contains_named_graph(&self, named_graph: &Self::Subject) -> bool

Checks if the dataset contains the given named graph.

Source

fn quad_predicates_objects<'p>( &self, graph: Option<&'p Self::Subject>, subject: &'p Self::Subject, ) -> QuadPredicatesObjects<'_, 'p, Self>

Returns an iterator over all the predicates p matching any quad subject p o graph present in the dataset, for any object o.

Source

fn quad_objects<'p>( &self, graph: Option<&'p Self::Subject>, subject: &'p Self::Subject, predicate: &'p Self::Subject, ) -> 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§