pub struct Config {
pub base_url: String,
pub timeout: Duration,
pub user_agent: String,
pub retry_enabled: bool,
pub max_retries: u32,
}Expand description
Configuration for the Jito API client
Fields§
§base_url: StringBase URL for the API
timeout: DurationRequest timeout in seconds
user_agent: StringUser agent string
retry_enabled: boolEnable retry on failure
max_retries: u32Maximum number of retries
Implementations§
Source§impl Config
impl Config
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set request timeout
Sourcepub fn with_user_agent(self, user_agent: impl Into<String>) -> Self
pub fn with_user_agent(self, user_agent: impl Into<String>) -> Self
Set user agent
Sourcepub fn with_retry(self, enabled: bool) -> Self
pub fn with_retry(self, enabled: bool) -> Self
Enable or disable retries
Sourcepub fn with_max_retries(self, max_retries: u32) -> Self
pub fn with_max_retries(self, max_retries: u32) -> Self
Set maximum number of retries
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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