pub trait Rule: Debug + Spanned {
    // Required methods
    fn kind(&self) -> Check;
    fn apply<'input, 'context, C>(
        &self,
        context: &mut C
    ) -> DiagResult<Matches<'input>>
       where C: Context<'input, 'context> + ?Sized;
}

Required Methods§

source

fn kind(&self) -> Check

source

fn apply<'input, 'context, C>( &self, context: &mut C ) -> DiagResult<Matches<'input>>
where C: Context<'input, 'context> + ?Sized,

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'r, R> Rule for &'r R
where R: ?Sized + Rule,

source§

fn kind(&self) -> Check

source§

fn apply<'input, 'context, C>( &self, context: &mut C ) -> DiagResult<Matches<'input>>
where C: Context<'input, 'context> + ?Sized,

source§

impl<R> Rule for Box<R>
where R: Rule + ?Sized,

source§

fn kind(&self) -> Check

source§

fn apply<'input, 'context, C>( &self, context: &mut C ) -> DiagResult<Matches<'input>>
where C: Context<'input, 'context> + ?Sized,

Implementors§

source§

impl Rule for CheckEmpty

source§

impl<'check> Rule for CheckDag<'check>

source§

impl<'context> Rule for dyn DynRule + 'context

source§

impl<M> Rule for CheckNext<M>
where M: MatcherMut,

source§

impl<M> Rule for CheckPlain<M>
where M: MatcherMut,

source§

impl<M> Rule for CheckSame<M>
where M: MatcherMut,