Struct fire_http_representation::response::Response
source · [−]pub struct Response {
pub header: ResponseHeader,
pub body: Body,
}
Expand description
The response created from a server.
Fields
header: ResponseHeader
body: Body
Implementations
sourceimpl Response
impl Response
sourcepub fn new(header: ResponseHeader, body: Body) -> Self
pub fn new(header: ResponseHeader, body: Body) -> Self
Creates a new Response
.
sourcepub fn builder() -> ResponseBuilder
pub fn builder() -> ResponseBuilder
Creates a new Response
with a builder.
sourcepub fn header(&self) -> &ResponseHeader
pub fn header(&self) -> &ResponseHeader
Get the response header by reference.
Trait Implementations
sourceimpl From<StatusCode> for Response
impl From<StatusCode> for Response
sourcefn from(status_code: StatusCode) -> Self
fn from(status_code: StatusCode) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl !UnwindSafe for Response
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more