[][src]Function buf_redux::set_drop_err_handler

pub fn set_drop_err_handler<F: 'static>(handler: F) where
    F: Fn(&mut dyn Write, &mut Buffer, Error), 

Set a thread-local handler for errors thrown in BufWriter's Drop impl.

The Write impl, buffer (at the time of the erroring write) and IO error are provided.

Replaces the previous handler. By default this is a no-op.

Panics

If called from within a handler previously provided to this function.