pub trait ResponseBuilder:
Debug
+ Send
+ Sync {
// Required method
fn build(&self, error: &ServiceError<'_>) -> (String, &'static str);
}Expand description
A trait for building custom response formats from ServiceError data.
Required Methods§
Sourcefn build(&self, error: &ServiceError<'_>) -> (String, &'static str)
fn build(&self, error: &ServiceError<'_>) -> (String, &'static str)
Build a response body and content-type from the error data.