Struct httpclient::Response
source · [−]pub struct Response(_);
Implementations
sourceimpl Response
impl Response
pub fn try_clone(&self) -> Result<Response, Error>
pub fn status(&self) -> StatusCode
pub fn headers(&self) -> &HeaderMap
pub fn body(&self) -> &Body
pub fn body_mut(&mut self) -> &mut Body
pub fn error_for_status(self) -> Result<Self, Self>
pub async fn text(self) -> Result<String, Error>
pub async fn json<U: DeserializeOwned>(self) -> Result<U, Error>
pub async fn bytes(self) -> Result<Bytes, Error>
pub fn into_parts(self) -> (Parts, Body)
pub fn from_parts(parts: Parts, body: Body) -> Self
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Response
impl<'de> Deserialize<'de> for Response
sourcefn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more