pub struct ConfigBuilder { /* private fields */ }
Implementations§
Source§impl ConfigBuilder
impl ConfigBuilder
Sourcepub const fn stream_timeout(self, stream_timeout: Option<Duration>) -> Self
pub const fn stream_timeout(self, stream_timeout: Option<Duration>) -> Self
Set the timeout for the
bytes_stream_resumable
.
If no new data has been received for the specified duration, it times out,
and depending on the RetryPolicy
and RetryableStrategy
a retry is tried.
If the value is None
, it will never time out.
Sourcepub fn retry_policy<P: RetryPolicy + Send + Sync + 'static>(
self,
retry_policy: P,
) -> Self
pub fn retry_policy<P: RetryPolicy + Send + Sync + 'static>( self, retry_policy: P, ) -> Self
Set the retry policy.
Retries are counted in execute_resumable
and bytes_stream_resumable
,
and will be reset whenever new data has been received.
Sourcepub fn retryable_strategy<S: RetryableStrategy + Send + Sync + 'static>(
self,
retryable_strategy: S,
) -> Self
pub fn retryable_strategy<S: RetryableStrategy + Send + Sync + 'static>( self, retryable_strategy: S, ) -> Self
Set the retryable strategy.
Trait Implementations§
Source§impl Default for ConfigBuilder
impl Default for ConfigBuilder
Source§fn default() -> Self
fn default() -> Self
The default config builder has no stream timeout,
uses an exponential backoff with 10 retries,
and uses the DefaultRetryableStrategy
Auto Trait Implementations§
impl Freeze for ConfigBuilder
impl !RefUnwindSafe for ConfigBuilder
impl Send for ConfigBuilder
impl Sync for ConfigBuilder
impl Unpin for ConfigBuilder
impl !UnwindSafe for ConfigBuilder
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