ResponseBuilder

Trait ResponseBuilder 

Source
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§

Source

fn build(&self, error: &ServiceError<'_>) -> (String, &'static str)

Build a response body and content-type from the error data.

Implementors§