Skip to main content

Handler

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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<N, W, H> Handler<N, W> for &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>,