pub trait ErrorHandler<M: Send>: Service {
// Required method
fn handle(&mut self, err: M, ctx: &mut ServiceContext<Self>) -> ErrorAction;
}
Expand description
Handler for accepting streams of messages for a service from streams attached to the service
Required Methods§
Sourcefn handle(&mut self, err: M, ctx: &mut ServiceContext<Self>) -> ErrorAction
fn handle(&mut self, err: M, ctx: &mut ServiceContext<Self>) -> ErrorAction
Handler for handling errors that occur in associated services
in cases such as errors while writing messages to a connected sink.
Responds with an ErrorAction
which determines how the service
should react to the error
self
The service handling the error
err
The error that was encountered
ctx
Mutable borrow of the service context
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.