Skip to main content

AsyncPatternMatchingGraph

Trait AsyncPatternMatchingGraph 

Source
pub trait AsyncPatternMatchingGraph: TryGraph {
    type AsyncTriplePatternMatching<'a, 'p>: Stream<Item = Result<Triple<Self::Resource>, Self::Error>>
       where Self: 'a,
             Self::Resource: 'p;

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

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

Async pattern-matching-capable graph.

Required Associated Types§

Source

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

Asynchronous fallible pattern-matching stream.

Required Methods§

Source

async fn async_triple_pattern_matching<'p>( &self, pattern: LinearTriplePattern<&'p Self::Resource>, ) -> Result<Self::AsyncTriplePatternMatching<'_, 'p>, Self::Error>

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

Provided Methods§

Source

async fn async_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: TryPatternMatchingGraph> AsyncPatternMatchingGraph for D

Any fallible pattern-matching-capable graph can be used, synchronously, as an asynchronous pattern-matching-capable graph.

Source§

type AsyncTriplePatternMatching<'a, 'p> = Iter<<D as TryPatternMatchingGraph>::TryTriplePatternMatching<'a, 'p>> where Self: 'a, Self::Resource: 'p