Skip to main content

Rule

Trait Rule 

Source
pub trait Rule: Send {
    // Required method
    fn id(&self) -> &'static str;

    // Provided methods
    fn max_severity(&self) -> Severity { ... }
    fn interest(&self) -> Interest { ... }
    fn init(&mut self, _ctx: &ValidationContext) { ... }
    fn on_event(
        &mut self,
        _event: &ParseEvent,
        _ctx: &mut ValidationContext,
        _out: &mut dyn MessageSink,
    ) { ... }
    fn on_finish(
        &mut self,
        _ctx: &mut ValidationContext,
        _out: &mut dyn MessageSink,
    ) { ... }
}

Required Methods§

Source

fn id(&self) -> &'static str

Provided Methods§

Source

fn max_severity(&self) -> Severity

Source

fn interest(&self) -> Interest

Source

fn init(&mut self, _ctx: &ValidationContext)

Source

fn on_event( &mut self, _event: &ParseEvent, _ctx: &mut ValidationContext, _out: &mut dyn MessageSink, )

Source

fn on_finish( &mut self, _ctx: &mut ValidationContext, _out: &mut dyn MessageSink, )

Implementors§