pub struct Response {
pub status: StatusCode,
pub headers: HashMap<String, String>,
pub body: Bytes,
}Expand description
An HTTP response.
Fields§
§status: StatusCodeHTTP status code.
headers: HashMap<String, String>Response headers.
body: BytesResponse body.
Implementations§
Trait Implementations§
Source§impl IntoResponse for Response
impl IntoResponse for Response
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Convert self into a
Response.Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnsafeUnpin for Response
impl UnwindSafe for Response
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).