Trait PatternMatchingDataset

Source
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: CanonicalQuadPattern<&'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: PredicateTraversableDataset { ... }
    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.

Required Associated Types§

Source

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

Pattern-matching iterator.

Required Methods§

Source

fn quad_pattern_matching<'p>( &self, pattern: CanonicalQuadPattern<&'p Self::Resource>, ) -> 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::Resource>) -> bool

Checks if the dataset contains the given quad.

Source

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

Checks if the dataset contains the given subject.

Source

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

Checks if the dataset contains the given predicate.

Source

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

Checks if the dataset contains the given object.

Source

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

Checks if the dataset contains the given named graph.

Source

fn quad_predicates_objects<'p>( &self, graph: Option<&'p Self::Resource>, subject: &'p Self::Resource, ) -> 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::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", so this trait is not object safe.

Implementors§