fn error_response(&self) -> HttpResponse {
        let mut res = HttpResponse::new(self.status_code());

        let mut buf = BytesMut::new();
        let _ = write!(helpers::MutWriter(&mut buf), "{}", self);

        res.headers_mut().insert(
            header::CONTENT_TYPE,
            header::HeaderValue::from_static("text/plain; charset=utf-8"),
        );

        res.set_body(AnyBody::from(buf))
    }
/// Creates full response for error.
///
/// By default, the generated response uses a 500 Internal Server Error status code, a
/// `Content-Type` of `text/plain`, and the body is set to `Self`'s `Display` impl.
Creates full response for error.
Creates full response for error .
fn error_response(&self) -> HttpResponse {
        let mut res = HttpResponse::new(self.status_code());
        let mut buf = BytesMut::new();
        let _ = write!(helpers::MutWriter(&mut buf), "{}", self);
        res.headers_mut().insert(
            header::CONTENT_TYPE,
            header::HeaderValue::from_static("text/plain; charset=utf-8"),
        );
        res.set_body(AnyBody::from(buf))
    }
fn error_response ( & self ) -> HttpResponse { let mut res = HttpResponse :: new ( self . status_code ( ) ) ; let mut buf = BytesMut :: new ( ) ; let _ = write ! ( helpers MutWriter ( mut buf ) " " self ) ; res . headers_mut ( ) . insert ( header :: CONTENT_TYPE , header :: HeaderValue :: from_static ( " " ) , ) ; res . set_body ( AnyBody :: from ( buf ) ) }
Creates full response for error.
Creates full response for error .
&self
&self