pub struct RequestOptions {
pub retry: Option<RetryPolicy>,
pub timeout: Option<Duration>,
pub headers: HeaderMap,
pub cancellation_token: Option<CancellationToken>,
}Expand description
Per-call overrides. An omitted field inherits the client’s setting.
Fields§
§retry: Option<RetryPolicy>Complete retry policy override; use struct update syntax for partial changes.
timeout: Option<Duration>Timeout per attempt, including reading the response body.
headers: HeaderMapAdditional headers. SDK protocol and authentication headers remain protected.
cancellation_token: Option<CancellationToken>Cancels async requests, response reads, and retry delays. Blocking calls reject this option; use the async client for cancellation.
Trait Implementations§
Source§impl Clone for RequestOptions
impl Clone for RequestOptions
Source§fn clone(&self) -> RequestOptions
fn clone(&self) -> RequestOptions
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 RequestOptions
impl Debug for RequestOptions
Source§impl Default for RequestOptions
impl Default for RequestOptions
Source§fn default() -> RequestOptions
fn default() -> RequestOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for RequestOptions
impl !UnwindSafe for RequestOptions
impl Freeze for RequestOptions
impl Send for RequestOptions
impl Sync for RequestOptions
impl Unpin for RequestOptions
impl UnsafeUnpin for RequestOptions
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