Expand description
A response coming from an HTTP endpoint.
Fields
status: u16
The HTTP status code of the response.
body: Vec<u8>
headers: Headers
Implementations
sourceimpl Response
impl Response
sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Whether or not the response code represents HTTP success.
sourcepub fn is_client_error(&self) -> bool
pub fn is_client_error(&self) -> bool
Whether or not the response code represents HTTP client error.
sourcepub fn is_server_error(&self) -> bool
pub fn is_server_error(&self) -> bool
Whether or not the response code represents HTTP server error.
Trait Implementations
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<'a, T, E> AsTaggedExplicit<'a, E> for T where
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for T where
T: 'a,
sourceimpl<'a, T, E> AsTaggedImplicit<'a, E> for T where
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for T where
T: 'a,
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