Skip to main content

TryPatternMatchingGraph

Trait TryPatternMatchingGraph 

Source
pub trait TryPatternMatchingGraph: TryGraph {
    type TryTriplePatternMatching<'a, 'p>: Iterator<Item = Result<Triple<Self::Resource>, Self::Error>>
       where Self: 'a,
             Self::Resource: 'p;

    // Required method
    fn try_triple_pattern_matching<'p>(
        &self,
        pattern: LinearTriplePattern<&'p Self::Resource>,
    ) -> Result<Self::TryTriplePatternMatching<'_, 'p>, Self::Error>;

    // Provided method
    fn try_contains_triple(
        &self,
        triple: Triple<&Self::Resource>,
    ) -> Result<bool, Self::Error> { ... }
}
Expand description

Pattern-matching-capable fallible graph.

Required Associated Types§

Source

type TryTriplePatternMatching<'a, 'p>: Iterator<Item = Result<Triple<Self::Resource>, Self::Error>> where Self: 'a, Self::Resource: 'p

Fallible pattern-matching iterator.

Required Methods§

Source

fn try_triple_pattern_matching<'p>( &self, pattern: LinearTriplePattern<&'p Self::Resource>, ) -> Result<Self::TryTriplePatternMatching<'_, 'p>, Self::Error>

Returns a fallible iterator over all the triples of the graph matching the given pattern.

Provided Methods§

Source

fn try_contains_triple( &self, triple: Triple<&Self::Resource>, ) -> Result<bool, Self::Error>

Checks if the graph contains the given triple.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<D: PatternMatchingGraph> TryPatternMatchingGraph for D
where D::Resource: Clone,

Any non-fallible pattern-matching-capable graph can be used as fallible, with the Infallible error type.