pub struct HttpResponse {
pub status: u16,
pub body: String,
}Expand description
A completed HTTP response: the numeric status and the body as text. Non-2xx
responses are returned as Ok (not errors) so callers can branch on 404 vs
other statuses exactly like the TS response.ok / response.status checks.
Fields§
§status: u16§body: StringImplementations§
Trait Implementations§
Source§impl Clone for HttpResponse
impl Clone for HttpResponse
Auto Trait Implementations§
impl Forget for HttpResponse
impl Freeze for HttpResponse
impl Move for HttpResponse
impl RefUnwindSafe for HttpResponse
impl Send for HttpResponse
impl Sync for HttpResponse
impl Unpin for HttpResponse
impl UnsafeUnpin for HttpResponse
impl UnwindSafe for HttpResponse
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