#[non_exhaustive]pub struct CallOptions {
pub timeout: Option<Duration>,
pub retry: Option<RetryPolicy>,
}Expand description
Per-call transport settings. Transports without timeouts or retries, such as the fake, ignore them.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.timeout: Option<Duration>Timeout for each attempt; None uses the transport’s default.
retry: Option<RetryPolicy>Retry policy; None uses the transport’s default.
Implementations§
Source§impl CallOptions
impl CallOptions
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Sets the timeout for each attempt.
Sourcepub fn with_retry(self, retry: RetryPolicy) -> Self
pub fn with_retry(self, retry: RetryPolicy) -> Self
Sets the retry policy.
Trait Implementations§
Source§impl Clone for CallOptions
impl Clone for CallOptions
Source§fn clone(&self) -> CallOptions
fn clone(&self) -> CallOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CallOptions
impl Debug for CallOptions
Source§impl Default for CallOptions
impl Default for CallOptions
Source§fn default() -> CallOptions
fn default() -> CallOptions
Returns the “default value” for a type. Read more
Source§impl PartialEq for CallOptions
impl PartialEq for CallOptions
impl StructuralPartialEq for CallOptions
Auto Trait Implementations§
impl Freeze for CallOptions
impl RefUnwindSafe for CallOptions
impl Send for CallOptions
impl Sync for CallOptions
impl Unpin for CallOptions
impl UnsafeUnpin for CallOptions
impl UnwindSafe for CallOptions
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