pub struct Response(/* private fields */);
Available on crate feature
http-api
only.Expand description
The HTTP response.
Implementations§
source§impl Response
impl Response
sourcepub fn status(&self) -> StatusCode
pub fn status(&self) -> StatusCode
Get the StatusCode
of this Response.
sourcepub async fn bytes(self) -> Result<RawResponse>
pub async fn bytes(self) -> Result<RawResponse>
Reads the response as raw bytes.
sourcepub async fn read(self) -> Result<ResponseData>
pub async fn read(self) -> Result<ResponseData>
Reads the response.
Note that the body is serialized to a Value
.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Response
impl !RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin 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