Skip to main content

Handler

Trait Handler 

Source
pub trait Handler: Send + Sync {
    // Required method
    fn handle(&self, record: LogRecord) -> Result<bool, BoxError>;

    // Provided methods
    fn is_handling(&self, _record: &LogRecord) -> bool { ... }
    fn close(&self) -> Result<(), BoxError> { ... }
    fn reset(&self) -> Result<(), BoxError> { ... }
}

Required Methods§

Source

fn handle(&self, record: LogRecord) -> Result<bool, BoxError>

Returning true stops bubbling the record through remaining handlers.

Provided Methods§

Source

fn is_handling(&self, _record: &LogRecord) -> bool

Source

fn close(&self) -> Result<(), BoxError>

Source

fn reset(&self) -> Result<(), BoxError>

Implementors§