pub struct ClientResponse { /* private fields */ }Expand description
What the server answered
Implementations§
Source§impl ClientResponse
impl ClientResponse
Sourcepub fn version(&self) -> Version
pub fn version(&self) -> Version
The HTTP version the response arrived with (HTTP_2 on an HTTP/2 connection)
pub fn status(&self) -> u16
pub fn is_success(&self) -> bool
pub fn headers(&self) -> &HeaderMap
pub fn bytes(&self) -> &Bytes
pub fn text(&self) -> Result<String, ClientError>
pub fn json<T: DeserializeOwned>(&self) -> Result<T, ClientError>
Trait Implementations§
Source§impl Clone for ClientResponse
impl Clone for ClientResponse
Auto Trait Implementations§
impl !Freeze for ClientResponse
impl RefUnwindSafe for ClientResponse
impl Send for ClientResponse
impl Sync for ClientResponse
impl Unpin for ClientResponse
impl UnsafeUnpin for ClientResponse
impl UnwindSafe for ClientResponse
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