pub fn client_error<T>(data: T) -> Response<Body>
where
    T: Into<Vec<u8>>,
{
    let bytes: Vec<u8> = data.into();
    let content_length = bytes.len();
    success_or_recoverable_error(
        hyper::StatusCode::BAD_GATEWAY,
        Option::from(Body::from(bytes)),
        Option::from(make_header_map_with_single_value(
            hyper::header::CONTENT_LENGTH,
            content_length.into(),
        )),
    )
}
/// A utility function that produces a client error response from a type that
/// can be converted to a vector of bytes.
A utility function that produces a client error response from a type that
can be converted to a vector of bytes.
A utility function that produces a client error response from a type that can be converted to a vector of bytes .
pub fn client_error<T>(data: T) -> Response<Body>
where
    T: Into<Vec<u8>>,
{
    let bytes: Vec<u8> = data.into();
    let content_length = bytes.len();
    success_or_recoverable_error(
        hyper::StatusCode::BAD_GATEWAY,
        Option::from(Body::from(bytes)),
        Option::from(make_header_map_with_single_value(
            hyper::header::CONTENT_LENGTH,
            content_length.into(),
        )),
    )
}
pub fn client_error < T > ( data : T ) -> Response < Body > where T : Into < Vec < u8 > > , { let bytes : Vec < u8 > = data . into ( ) ; let content_length = bytes . len ( ) ; success_or_recoverable_error ( hyper :: StatusCode :: BAD_GATEWAY , Option :: from ( Body :: from ( bytes ) ) , Option :: from ( make_header_map_with_single_value ( hyper :: header :: CONTENT_LENGTH , content_length . into ( ) , ) ) , ) }
A utility function that produces a client error response from a type that
can be converted to a vector of bytes.
A utility function that produces a client error response from a type that can be converted to a vector of bytes .
data
T