Skip to main content

PatternMatchingDatasetMut

Trait PatternMatchingDatasetMut 

Source
pub trait PatternMatchingDatasetMut: PatternMatchingDataset {
    type ExtractMatchingQuads<'a, 'p>: Iterator<Item = Quad<Self::Resource>>
       where Self: 'a,
             Self::Resource: 'p;

    // Required method
    fn extract_matching_quads<'p>(
        &mut self,
        pattern: impl Into<LinearQuadPattern<&'p Self::Resource>>,
    ) -> Self::ExtractMatchingQuads<'_, 'p>
       where Self::Resource: 'p;
}
Expand description

Pattern-matching-capable mutable dataset.

Required Associated Types§

Source

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

Pattern-matching iterator.

Required Methods§

Source

fn extract_matching_quads<'p>( &mut self, pattern: impl Into<LinearQuadPattern<&'p Self::Resource>>, ) -> Self::ExtractMatchingQuads<'_, 'p>
where Self::Resource: 'p,

Returns an iterator over all the quads matching the given linear quad pattern.

Each matching quad returned by Iterator::next are removed from the dataset. Matching quads that are not iterated on are kept in the dataset, even when the iterator is dropped.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<G: PatternMatchingGraphMut> PatternMatchingDatasetMut for G

Any single-graph, pattern-matching-capable mutable graph is a pattern-matching mutable dataset, only ever extracting quads from the default graph.

Source§

impl<R: Clone + Ord> PatternMatchingDatasetMut for IndexedBTreeDataset<R>

Source§

type ExtractMatchingQuads<'a, 'p> = ExtractPatternMatching<'a, R> where Self: 'a, R: 'p