Skip to main content

TryPatternMatchingDataset

Trait TryPatternMatchingDataset 

Source
pub trait TryPatternMatchingDataset: TryDataset {
    type TryQuadPatternMatching<'a, 'p>: Iterator<Item = Result<Quad<Self::Resource>, Self::Error>>
       where Self: 'a,
             Self::Resource: 'p;

    // Required method
    fn try_quad_pattern_matching<'p>(
        &self,
        pattern: Quad<Option<&'p Self::Resource>>,
    ) -> Result<Self::TryQuadPatternMatching<'_, 'p>, Self::Error>;

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

Pattern-matching-capable fallible dataset.

Required Associated Types§

Source

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

Fallible pattern-matching iterator.

Required Methods§

Source

fn try_quad_pattern_matching<'p>( &self, pattern: Quad<Option<&'p Self::Resource>>, ) -> Result<Self::TryQuadPatternMatching<'_, 'p>, Self::Error>

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

Provided Methods§

Source

fn try_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 for D

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