pub type WriteFailureSink = Arc<dyn Fn(PathBuf, u32, usize, String) + Send + Sync + 'static>;Expand description
Invoked (off the caller’s thread — on the shared worker thread) when a
DebouncedWriter’s queued patches are permanently discarded: either
flush_writer gave up after MAX_WRITE_ATTEMPTS, or the writer was
dropped (Unregister) while its final flush was still failing. This is
the write-side analogue of crate::reload::Reloadable’s read-side
contract — the previous behaviour was a bare eprintln! that never left
the worker thread, so a permanently unwritable settings file (read-only
mount, revoked permissions, disk full) silently ate every change for the
rest of the session with zero signal to the application. Registered
process-wide via set_write_failure_sink.
Aliased Type§
pub struct WriteFailureSink { /* private fields */ }