pub struct RequestSettings { /* private fields */ }
Expand description
Settings for the HTTP Requests.
By default, 3 retries are done with a fixed retry_time of 1000 ms.
Implementations§
Source§impl RequestSettings
impl RequestSettings
Sourcepub const fn fixed_retry(self, interval: Duration) -> Self
pub const fn fixed_retry(self, interval: Duration) -> Self
Set to use fixed interval retrying.
Sourcepub const fn exp_backoff(
self,
start_time: Duration,
max_time: Option<Duration>,
) -> Self
pub const fn exp_backoff( self, start_time: Duration, max_time: Option<Duration>, ) -> Self
Set to use exponential backoff retrying.
Sourcepub fn header(self, header: HeaderName, value: HeaderValue) -> Self
pub fn header(self, header: HeaderName, value: HeaderValue) -> Self
Insert a header into the request headers to be set on each request.
Trait Implementations§
Source§impl Clone for RequestSettings
impl Clone for RequestSettings
Source§fn clone(&self) -> RequestSettings
fn clone(&self) -> RequestSettings
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RequestSettings
impl Debug for RequestSettings
Auto Trait Implementations§
impl Freeze for RequestSettings
impl RefUnwindSafe for RequestSettings
impl Send for RequestSettings
impl Sync for RequestSettings
impl Unpin for RequestSettings
impl UnwindSafe for RequestSettings
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