pub struct RequestOptions {
pub api_key: Option<String>,
pub token: Option<String>,
pub max_retries: Option<u32>,
pub timeout_seconds: Option<u64>,
pub additional_headers: HashMap<String, String>,
pub additional_query_params: HashMap<String, String>,
}Expand description
Options for customizing individual requests
Fields§
§api_key: Option<String>API key for authentication (overrides client-level API key)
token: Option<String>Bearer token for authentication (overrides client-level token)
max_retries: Option<u32>Maximum number of retry attempts for failed requests
timeout_seconds: Option<u64>Request timeout in seconds (overrides client-level timeout)
additional_headers: HashMap<String, String>Additional headers to include in the request
additional_query_params: HashMap<String, String>Additional query parameters to include in the request
Implementations§
Source§impl RequestOptions
impl RequestOptions
pub fn new() -> Self
pub fn api_key(self, key: impl Into<String>) -> Self
pub fn token(self, token: impl Into<String>) -> Self
pub fn max_retries(self, retries: u32) -> Self
pub fn timeout_seconds(self, timeout: u64) -> Self
pub fn additional_header( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
pub fn additional_query_param( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
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 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