pub trait ErrorResponder: Send + Sync {
// Required method
fn error_response<'a>(
&'a self,
status: StatusCode,
) -> impl Future<Output = Response<BoxBody<Bytes, Error>>> + Send + 'a;
}Expand description
Generates HTTP error responses for proxy failures.
Implement this trait to customize error pages shown to clients when proxy operations fail.
Required Methods§
Sourcefn error_response<'a>(
&'a self,
status: StatusCode,
) -> impl Future<Output = Response<BoxBody<Bytes, Error>>> + Send + 'a
fn error_response<'a>( &'a self, status: StatusCode, ) -> impl Future<Output = Response<BoxBody<Bytes, Error>>> + Send + 'a
Generates an HTTP response for the given error status code.
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.