Trait ErrorSink
pub trait ErrorSink<E = Box<dyn Error + Sync + Send>>:
Send
+ Sync
+ 'static {
// Required method
fn sink_error(&self, error: E);
}Expand description
A sink for errors produced in fire-and-forget contexts where the error cannot be propagated back to a caller.
Implemented for any Fn(E) + Send + Sync + 'static, and by the provided
TracingErrorSink. Use it as a trait object (Arc<dyn ErrorSink>) when
the sink is configurable at runtime.
Required Methods§
fn sink_error(&self, error: E)
fn sink_error(&self, error: E)
Consume (observe and/or route) an error.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".