pub struct RequestOptions {
pub timeout: Option<Duration>,
pub session_id: Option<String>,
pub agent_id: Option<String>,
pub idempotency_key: Option<String>,
pub required_extensions: Vec<String>,
}Expand description
Options for individual requests
Fields§
§timeout: Option<Duration>Request timeout
session_id: Option<String>Session ID for routing
agent_id: Option<String>Agent ID for routing to specific agent
idempotency_key: Option<String>Idempotency key for replay protection
required_extensions: Vec<String>Required extensions
Implementations§
Source§impl RequestOptions
impl RequestOptions
Sourcepub fn with_timeout(timeout: Duration) -> Self
pub fn with_timeout(timeout: Duration) -> Self
Create new options with timeout
Sourcepub fn session_id(self, session_id: impl Into<String>) -> Self
pub fn session_id(self, session_id: impl Into<String>) -> Self
Set session ID
Sourcepub fn idempotency_key(self, key: impl Into<String>) -> Self
pub fn idempotency_key(self, key: impl Into<String>) -> Self
Set idempotency key
Sourcepub fn require_extension(self, extension: impl Into<String>) -> Self
pub fn require_extension(self, extension: impl Into<String>) -> Self
Add required extension
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 · 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 Freeze for RequestOptions
impl RefUnwindSafe for RequestOptions
impl Send for RequestOptions
impl Sync for RequestOptions
impl Unpin for RequestOptions
impl UnsafeUnpin for RequestOptions
impl UnwindSafe 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