Skip to main content

WarningSink

Trait WarningSink 

Source
pub trait WarningSink {
    // Required method
    fn warn(&mut self, warning: Warning);

    // Provided method
    fn is_suppressed(&self, _name: Option<&str>) -> bool { ... }
}
Expand description

Receives the warnings a library call raises.

Required Methods§

Source

fn warn(&mut self, warning: Warning)

Takes one warning.

Provided Methods§

Source

fn is_suppressed(&self, _name: Option<&str>) -> bool

True if warnings with this name would be dropped (muted or over quota); callers use it to skip work that only builds a warning.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§