Trait RuleSet

Source
pub trait RuleSet<E: FTMLExtractor> {
    type I<'i>: Iterator<Item = FTMLExtractionRule<E>>
       where Self: 'i,
             E: 'i;

    // Required method
    fn iter_rules(&self) -> Self::I<'_>;

    // Provided methods
    fn applicable_rules<'a>(
        &self,
        extractor: &mut E,
        attrs: &'a mut E::Attr<'a>,
    ) -> Option<FTMLElements> { ... }
    fn do_rules<'a>(
        extractor: &mut E,
        attrs: &'a mut E::Attr<'a>,
        rules: SmallVec<FTMLExtractionRule<E>, 4>,
    ) -> Option<FTMLElements> { ... }
}

Required Associated Types§

Source

type I<'i>: Iterator<Item = FTMLExtractionRule<E>> where Self: 'i, E: 'i

Required Methods§

Source

fn iter_rules(&self) -> Self::I<'_>

Provided Methods§

Source

fn applicable_rules<'a>( &self, extractor: &mut E, attrs: &'a mut E::Attr<'a>, ) -> Option<FTMLElements>

Source

fn do_rules<'a>( extractor: &mut E, attrs: &'a mut E::Attr<'a>, rules: SmallVec<FTMLExtractionRule<E>, 4>, ) -> Option<FTMLElements>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<const L: usize, E: FTMLExtractor> RuleSet<E> for [FTMLExtractionRule<E>; L]

Source§

type I<'i> = Copied<Iter<'i, FTMLExtractionRule<E>>> where E: 'i

Source§

fn iter_rules(&self) -> Self::I<'_>

Implementors§