pub struct ReqwestBackend { /* private fields */ }Expand description
The default backend: executes requests on a wrapped [reqwest::Client], adapting each request
from the seam to reqwest and each response back. This is what Client::new and
Client::with_client install.
An in-memory request body moves to reqwest without a copy off wasm32, and a streaming one
is streamed; reqwest’s fetch backend on wasm32 sends no streaming body, and refuses one as
a request-kind failure. A failure to execute is classified by
TransportError::from_reqwest, and one while reading the response body by the rules
super::Error::InterruptedBody and super::Error::Protocol describe.
Redirects are followed as the wrapped client’s policy decides. The client Client::new builds
follows one only within the origin of the request and refuses one to another origin as
super::Error::Redirect; a client passed to Client::with_client or Self::new keeps its
own policy, reqwest’s default following up to ten hops to any origin and forwarding every
header but Authorization, Cookie and the other few reqwest strips (an apiKey header or a
bound header among those forwarded).
Its Debug prints the connect and read timeouts ClientCore built its client with, each only
when set, and nothing of the wrapped client: reqwest’s own Debug of a client prints its
default headers (an Authorization among them) and proxies in full. A backend wrapping a
caller’s client prints as ReqwestBackend { .. }.
Implementations§
Trait Implementations§
Source§impl Clone for ReqwestBackend
impl Clone for ReqwestBackend
Source§fn clone(&self) -> ReqwestBackend
fn clone(&self) -> ReqwestBackend
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReqwestBackend
impl Debug for ReqwestBackend
Source§impl HttpBackend for ReqwestBackend
impl HttpBackend for ReqwestBackend
Source§fn execute(&self, request: Request<HttpBody>) -> ExecuteFuture<'_>
fn execute(&self, request: Request<HttpBody>) -> ExecuteFuture<'_>
TransportError with the constructor
naming the failure’s class, so the runtime’s send maps it to the right super::Error
variant. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ReqwestBackend
impl !UnwindSafe for ReqwestBackend
impl Freeze for ReqwestBackend
impl Send for ReqwestBackend
impl Sync for ReqwestBackend
impl Unpin for ReqwestBackend
impl UnsafeUnpin for ReqwestBackend
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more