pub struct RequestOptions { /* private fields */ }Expand description
One request’s total deadline and independent cancellation.
Implementations§
Source§impl RequestOptions
impl RequestOptions
pub fn with_timeout(timeout: Duration) -> Result<Self>
pub fn deadline(&self) -> Instant
Sourcepub fn with_retries(self, value: u32) -> Result<Self>
pub fn with_retries(self, value: u32) -> Result<Self>
Override safe-read retries for this operation. This never enables mutation or inference replay. Zero guarantees a single API attempt.
pub fn retry_limit(&self) -> Option<u32>
Sourcepub fn without_response_defaults(self) -> Self
pub fn without_response_defaults(self) -> Self
Validate this operation’s typed JSON responses without inserting frozen
schema defaults (for example a Red Team WebSocket target’s
ws_response_timeout: 110). Validation accepts and rejects exactly the
documents the default policy does; defaulted fields that the service omitted
stay unset, so the typed value reflects only the fields actually sent.
The default keeps source-SDK parity and inserts defaults. This affects
buffered contract responses and Gateway SSE contract events; it never
changes request validation. See Mode::ResponseWithoutDefaults.
Sourcepub fn response_defaults(&self) -> bool
pub fn response_defaults(&self) -> bool
Whether typed responses for this operation receive schema defaults.