pub struct RetriableRequestBuilder { /* private fields */ }Expand description
A reqwest::RequestBuilder wrapper that automatically retries failed
requests using an exponential back-off strategy powered by the backon
crate. Use RequestBuilderExt::with_retry to construct one.
Implementations§
Source§impl RetriableRequestBuilder
impl RetriableRequestBuilder
Sourcepub fn backoff(self, backoff: ExponentialBuilder) -> Self
pub fn backoff(self, backoff: ExponentialBuilder) -> Self
Overrides the default back-off settings.
Sourcepub async fn send_json<T: DeserializeOwned + Send + 'static>(self) -> Result<T>
pub async fn send_json<T: DeserializeOwned + Send + 'static>(self) -> Result<T>
Execute the request, applying retries, and parse the body as JSON.
Sourcepub async fn send_xml<T: DeserializeOwned + Send + 'static>(self) -> Result<T>
pub async fn send_xml<T: DeserializeOwned + Send + 'static>(self) -> Result<T>
Execute the request, applying retries, and parse the body as XML.
Sourcepub async fn send_no_response(self) -> Result<()>
pub async fn send_no_response(self) -> Result<()>
Execute the request, applying retries, without parsing the response body.
Auto Trait Implementations§
impl !Freeze for RetriableRequestBuilder
impl !RefUnwindSafe for RetriableRequestBuilder
impl Send for RetriableRequestBuilder
impl Sync for RetriableRequestBuilder
impl Unpin for RetriableRequestBuilder
impl UnsafeUnpin for RetriableRequestBuilder
impl !UnwindSafe for RetriableRequestBuilder
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