pub fn json(&self) -> ::reply::Response {
        use http::header::{CONTENT_TYPE, HeaderValue};
        use hyper::Body;

        let code = self.status();
        let mut res = http::Response::default();
        *res.status_mut() = code;

        res.headers_mut().insert(CONTENT_TYPE, HeaderValue::from_static("application/json"));

        *res.body_mut() = match serde_json::to_string(&self) {
            Ok(body) => Body::from(body),
            Err(_) => Body::from("{}"),
        };

        res
    }
/// Returns a json response for this rejection.
Returns a json response for this rejection.
Returns a json response for this rejection .
pub fn json(&self) -> ::reply::Response {
        use http::header::{CONTENT_TYPE, HeaderValue};
        use hyper::Body;
        let code = self.status();
        let mut res = http::Response::default();
        *res.status_mut() = code;
        res.headers_mut().insert(CONTENT_TYPE, HeaderValue::from_static("application/json"));
        *res.body_mut() = match serde_json::to_string(&self) {
            Ok(body) => Body::from(body),
            Err(_) => Body::from("{}"),
        };
        res
    }
pub fn json ( & self ) -> :: reply :: Response { use http :: header :: { CONTENT_TYPE , HeaderValue } ; use hyper :: Body ; let code = self . status ( ) ; let mut res = http :: Response :: default ( ) ; * res . status_mut ( ) = code ; res . headers_mut ( ) . insert ( CONTENT_TYPE , HeaderValue :: from_static ( " " ) ) ; * res . body_mut ( ) = match serde_json :: to_string ( & self ) { Ok ( body ) => Body :: from ( body ) , Err ( _ ) => Body :: from ( " " ) , } ; res }
Returns a json response for this rejection.
Returns a json response for this rejection .
&self