Trait Handler

Source
pub trait Handler<N, W> {
    // Required method
    fn handle(&mut self, vocabulary: &N, warning: W);
}
Expand description

Warning handler.

This trait is implemented by the unit type () which ignores warnings. You can use Print or PrintWith to print warnings on the standard output or implement your own handler.

Required Methods§

Source

fn handle(&mut self, vocabulary: &N, warning: W)

Handle a warning with the given vocabulary.

Implementations on Foreign Types§

Source§

impl<'a, N, W, H> Handler<N, W> for &'a mut H
where H: Handler<N, W>,

Source§

fn handle(&mut self, vocabulary: &N, warning: W)

Source§

impl<N, W> Handler<N, W> for ()

Source§

fn handle(&mut self, _vocabulary: &N, _warning: W)

Implementors§

Source§

impl<N, W> Handler<N, W> for Print
where W: Display,

Source§

impl<N, W> Handler<N, W> for PrintWith
where W: DisplayWithContext<N>,