use http::{HeaderMap, HeaderValue};
pub trait HttpHeaders {
fn http_headers(&self) -> &HeaderMap<HeaderValue>;
fn http_headers_mut(&mut self) -> &mut HeaderMap<HeaderValue>;
}
impl<B> HttpHeaders for http::Response<B> {
fn http_headers(&self) -> &HeaderMap<HeaderValue> {
self.headers()
}
fn http_headers_mut(&mut self) -> &mut HeaderMap<HeaderValue> {
self.headers_mut()
}
}
impl HttpHeaders for crate::operation::Response {
fn http_headers(&self) -> &HeaderMap<HeaderValue> {
self.http().http_headers()
}
fn http_headers_mut(&mut self) -> &mut HeaderMap<HeaderValue> {
self.http_mut().http_headers_mut()
}
}