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§

source

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

Implementors§