pub struct ClientOptions {
pub api_key: String,
pub service_url: String,
pub soft_id: u32,
pub client_timeout: Duration,
pub client_proxy: Option<ClientProxy>,
pub timeouts_override: Option<GetResultTimeouts>,
}Expand description
Client settings. Build with ClientOptions::new and chain with_* methods.
Fields§
§api_key: String§service_url: String§soft_id: u32§client_timeout: DurationTimeout of ONE HTTP request (not of the whole solving).
client_proxy: Option<ClientProxy>Proxy for the SDK’s own requests to the API (http/https only).
timeouts_override: Option<GetResultTimeouts>If set, replaces the per-captcha-type polling schedule (mostly useful for tests).
Implementations§
Source§impl ClientOptions
impl ClientOptions
pub fn new(api_key: impl Into<String>) -> Self
pub fn with_service_url(self, url: impl Into<String>) -> Self
pub fn with_soft_id(self, soft_id: u32) -> Self
pub fn with_client_timeout(self, timeout: Duration) -> Self
pub fn with_client_proxy(self, proxy: ClientProxy) -> Self
pub fn with_timeouts_override(self, timeouts: GetResultTimeouts) -> Self
Trait Implementations§
Source§impl Clone for ClientOptions
impl Clone for ClientOptions
Auto Trait Implementations§
impl Freeze for ClientOptions
impl RefUnwindSafe for ClientOptions
impl Send for ClientOptions
impl Sync for ClientOptions
impl Unpin for ClientOptions
impl UnsafeUnpin for ClientOptions
impl UnwindSafe for ClientOptions
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