pub trait ResponseLike {
    // Required methods
    fn status(&self) -> StatusCode;
    fn headers(&self) -> &HeaderMap;
}
Expand description

Allows using either Response or response::Parts, or your own newtype.

Required Methods§

source

fn status(&self) -> StatusCode

Same as res.status()

source

fn headers(&self) -> &HeaderMap

Same as res.headers()

Implementations on Foreign Types§

source§

impl ResponseLike for Parts

source§

impl<Body> ResponseLike for Response<Body>

Implementors§