Skip to main content

AsyncPatternMatchingDataset

Trait AsyncPatternMatchingDataset 

Source
pub trait AsyncPatternMatchingDataset: TryDataset {
    type AsyncQuadPatternMatching<'a, 'p>: Stream<Item = Result<Quad<Self::Resource>, Self::Error>>
       where Self: 'a,
             Self::Resource: 'p;

    // Required method
    async fn async_quad_pattern_matching<'p>(
        &self,
        pattern: LinearQuadPattern<&'p Self::Resource>,
    ) -> Result<Self::AsyncQuadPatternMatching<'_, 'p>, Self::Error>;

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

Async pattern-matching-capable dataset.

Required Associated Types§

Source

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

Asynchronous fallible pattern-matching stream.

Required Methods§

Source

async fn async_quad_pattern_matching<'p>( &self, pattern: LinearQuadPattern<&'p Self::Resource>, ) -> Result<Self::AsyncQuadPatternMatching<'_, 'p>, Self::Error>

Returns a stream over all the quads of the dataset matching the given pattern.

Provided Methods§

Source

async fn async_contains_quad( &self, quad: Quad<&Self::Resource>, ) -> Result<bool, Self::Error>

Checks if the dataset contains the given quad.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<D: TryPatternMatchingDataset> AsyncPatternMatchingDataset for D

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

Source§

type AsyncQuadPatternMatching<'a, 'p> = Iter<<D as TryPatternMatchingDataset>::TryQuadPatternMatching<'a, 'p>> where Self: 'a, Self::Resource: 'p