pub struct EzCapSolverClient { /* private fields */ }blocking only.Expand description
Blocking client for asynchronous and synchronous EzCaptchaSolver API operations.
Implementations§
Source§impl EzCapSolverClient
impl EzCapSolverClient
Sourcepub fn solve_recaptcha_v2_task_proxyless(
&self,
task: &RecaptchaV2Task,
) -> Result<Solved<RecaptchaSolution>>
pub fn solve_recaptcha_v2_task_proxyless( &self, task: &RecaptchaV2Task, ) -> Result<Solved<RecaptchaSolution>>
Creates the task, polls until it finishes, and returns its decoded solution.
The sync_-prefixed method runs the same type through the
synchronous endpoint instead.
Sourcepub fn sync_solve_recaptcha_v2_task_proxyless(
&self,
task: &RecaptchaV2Task,
) -> Result<Solved<RecaptchaSolution>>
pub fn sync_solve_recaptcha_v2_task_proxyless( &self, task: &RecaptchaV2Task, ) -> Result<Solved<RecaptchaSolution>>
Runs the task through the synchronous endpoint and returns its decoded solution.
Solved::task_id carries the identifier this endpoint assigns
and returns alongside the result.
Whether a given type is accepted on this endpoint is the
service’s decision; a type it does not serve is rejected with
ERROR_TASK_TYPE_NOT_ALLOWED before anything is billed.
Sourcepub fn solve_recaptcha_v2_task_proxyless_s9(
&self,
task: &RecaptchaV2Task,
) -> Result<Solved<RecaptchaSolution>>
pub fn solve_recaptcha_v2_task_proxyless_s9( &self, task: &RecaptchaV2Task, ) -> Result<Solved<RecaptchaSolution>>
Creates the task, polls until it finishes, and returns its decoded solution.
The sync_-prefixed method runs the same type through the
synchronous endpoint instead.
Sourcepub fn sync_solve_recaptcha_v2_task_proxyless_s9(
&self,
task: &RecaptchaV2Task,
) -> Result<Solved<RecaptchaSolution>>
pub fn sync_solve_recaptcha_v2_task_proxyless_s9( &self, task: &RecaptchaV2Task, ) -> Result<Solved<RecaptchaSolution>>
Runs the task through the synchronous endpoint and returns its decoded solution.
Solved::task_id carries the identifier this endpoint assigns
and returns alongside the result.
Whether a given type is accepted on this endpoint is the
service’s decision; a type it does not serve is rejected with
ERROR_TASK_TYPE_NOT_ALLOWED before anything is billed.
Sourcepub fn solve_recaptcha_v2_s_task_proxyless(
&self,
task: &RecaptchaV2Task,
) -> Result<Solved<RecaptchaSolution>>
pub fn solve_recaptcha_v2_s_task_proxyless( &self, task: &RecaptchaV2Task, ) -> Result<Solved<RecaptchaSolution>>
Creates the task, polls until it finishes, and returns its decoded solution.
The sync_-prefixed method runs the same type through the
synchronous endpoint instead.
Sourcepub fn sync_solve_recaptcha_v2_s_task_proxyless(
&self,
task: &RecaptchaV2Task,
) -> Result<Solved<RecaptchaSolution>>
pub fn sync_solve_recaptcha_v2_s_task_proxyless( &self, task: &RecaptchaV2Task, ) -> Result<Solved<RecaptchaSolution>>
Runs the task through the synchronous endpoint and returns its decoded solution.
Solved::task_id carries the identifier this endpoint assigns
and returns alongside the result.
Whether a given type is accepted on this endpoint is the
service’s decision; a type it does not serve is rejected with
ERROR_TASK_TYPE_NOT_ALLOWED before anything is billed.
Sourcepub fn solve_recaptcha_v2_enterprise_task_proxyless(
&self,
task: &RecaptchaV2Task,
) -> Result<Solved<RecaptchaSolution>>
pub fn solve_recaptcha_v2_enterprise_task_proxyless( &self, task: &RecaptchaV2Task, ) -> Result<Solved<RecaptchaSolution>>
Creates the task, polls until it finishes, and returns its decoded solution.
The sync_-prefixed method runs the same type through the
synchronous endpoint instead.
Sourcepub fn sync_solve_recaptcha_v2_enterprise_task_proxyless(
&self,
task: &RecaptchaV2Task,
) -> Result<Solved<RecaptchaSolution>>
pub fn sync_solve_recaptcha_v2_enterprise_task_proxyless( &self, task: &RecaptchaV2Task, ) -> Result<Solved<RecaptchaSolution>>
Runs the task through the synchronous endpoint and returns its decoded solution.
Solved::task_id carries the identifier this endpoint assigns
and returns alongside the result.
Whether a given type is accepted on this endpoint is the
service’s decision; a type it does not serve is rejected with
ERROR_TASK_TYPE_NOT_ALLOWED before anything is billed.
Sourcepub fn solve_recaptcha_v2_s_enterprise_task_proxyless(
&self,
task: &RecaptchaV2Task,
) -> Result<Solved<RecaptchaSolution>>
pub fn solve_recaptcha_v2_s_enterprise_task_proxyless( &self, task: &RecaptchaV2Task, ) -> Result<Solved<RecaptchaSolution>>
Creates the task, polls until it finishes, and returns its decoded solution.
The sync_-prefixed method runs the same type through the
synchronous endpoint instead.
Sourcepub fn sync_solve_recaptcha_v2_s_enterprise_task_proxyless(
&self,
task: &RecaptchaV2Task,
) -> Result<Solved<RecaptchaSolution>>
pub fn sync_solve_recaptcha_v2_s_enterprise_task_proxyless( &self, task: &RecaptchaV2Task, ) -> Result<Solved<RecaptchaSolution>>
Runs the task through the synchronous endpoint and returns its decoded solution.
Solved::task_id carries the identifier this endpoint assigns
and returns alongside the result.
Whether a given type is accepted on this endpoint is the
service’s decision; a type it does not serve is rejected with
ERROR_TASK_TYPE_NOT_ALLOWED before anything is billed.
Sourcepub fn solve_recaptcha_v2_classification(
&self,
task: &RecaptchaV2ClassificationTask,
) -> Result<Solved<ReClassificationSolution>>
pub fn solve_recaptcha_v2_classification( &self, task: &RecaptchaV2ClassificationTask, ) -> Result<Solved<ReClassificationSolution>>
Creates the task, polls until it finishes, and returns its decoded solution.
The sync_-prefixed method runs the same type through the
synchronous endpoint instead.
Sourcepub fn sync_solve_recaptcha_v2_classification(
&self,
task: &RecaptchaV2ClassificationTask,
) -> Result<Solved<ReClassificationSolution>>
pub fn sync_solve_recaptcha_v2_classification( &self, task: &RecaptchaV2ClassificationTask, ) -> Result<Solved<ReClassificationSolution>>
Runs the task through the synchronous endpoint and returns its decoded solution.
Solved::task_id carries the identifier this endpoint assigns
and returns alongside the result.
Whether a given type is accepted on this endpoint is the
service’s decision; a type it does not serve is rejected with
ERROR_TASK_TYPE_NOT_ALLOWED before anything is billed.
Sourcepub fn solve_recaptcha_v3_task_proxyless(
&self,
task: &RecaptchaV3Task,
) -> Result<Solved<RecaptchaSolution>>
pub fn solve_recaptcha_v3_task_proxyless( &self, task: &RecaptchaV3Task, ) -> Result<Solved<RecaptchaSolution>>
Creates the task, polls until it finishes, and returns its decoded solution.
The sync_-prefixed method runs the same type through the
synchronous endpoint instead.
Sourcepub fn sync_solve_recaptcha_v3_task_proxyless(
&self,
task: &RecaptchaV3Task,
) -> Result<Solved<RecaptchaSolution>>
pub fn sync_solve_recaptcha_v3_task_proxyless( &self, task: &RecaptchaV3Task, ) -> Result<Solved<RecaptchaSolution>>
Runs the task through the synchronous endpoint and returns its decoded solution.
Solved::task_id carries the identifier this endpoint assigns
and returns alongside the result.
Whether a given type is accepted on this endpoint is the
service’s decision; a type it does not serve is rejected with
ERROR_TASK_TYPE_NOT_ALLOWED before anything is billed.
Sourcepub fn solve_recaptcha_v3_task_proxyless_s9(
&self,
task: &RecaptchaV3Task,
) -> Result<Solved<RecaptchaSolution>>
pub fn solve_recaptcha_v3_task_proxyless_s9( &self, task: &RecaptchaV3Task, ) -> Result<Solved<RecaptchaSolution>>
Creates the task, polls until it finishes, and returns its decoded solution.
The sync_-prefixed method runs the same type through the
synchronous endpoint instead.
Sourcepub fn sync_solve_recaptcha_v3_task_proxyless_s9(
&self,
task: &RecaptchaV3Task,
) -> Result<Solved<RecaptchaSolution>>
pub fn sync_solve_recaptcha_v3_task_proxyless_s9( &self, task: &RecaptchaV3Task, ) -> Result<Solved<RecaptchaSolution>>
Runs the task through the synchronous endpoint and returns its decoded solution.
Solved::task_id carries the identifier this endpoint assigns
and returns alongside the result.
Whether a given type is accepted on this endpoint is the
service’s decision; a type it does not serve is rejected with
ERROR_TASK_TYPE_NOT_ALLOWED before anything is billed.
Sourcepub fn solve_recaptcha_v3_enterprise_task_proxyless(
&self,
task: &RecaptchaV3Task,
) -> Result<Solved<RecaptchaSolution>>
pub fn solve_recaptcha_v3_enterprise_task_proxyless( &self, task: &RecaptchaV3Task, ) -> Result<Solved<RecaptchaSolution>>
Creates the task, polls until it finishes, and returns its decoded solution.
The sync_-prefixed method runs the same type through the
synchronous endpoint instead.
Sourcepub fn sync_solve_recaptcha_v3_enterprise_task_proxyless(
&self,
task: &RecaptchaV3Task,
) -> Result<Solved<RecaptchaSolution>>
pub fn sync_solve_recaptcha_v3_enterprise_task_proxyless( &self, task: &RecaptchaV3Task, ) -> Result<Solved<RecaptchaSolution>>
Runs the task through the synchronous endpoint and returns its decoded solution.
Solved::task_id carries the identifier this endpoint assigns
and returns alongside the result.
Whether a given type is accepted on this endpoint is the
service’s decision; a type it does not serve is rejected with
ERROR_TASK_TYPE_NOT_ALLOWED before anything is billed.
Sourcepub fn solve_recaptcha_v3_enterprise_task_proxyless_s9(
&self,
task: &RecaptchaV3Task,
) -> Result<Solved<RecaptchaSolution>>
pub fn solve_recaptcha_v3_enterprise_task_proxyless_s9( &self, task: &RecaptchaV3Task, ) -> Result<Solved<RecaptchaSolution>>
Creates the task, polls until it finishes, and returns its decoded solution.
The sync_-prefixed method runs the same type through the
synchronous endpoint instead.
Sourcepub fn sync_solve_recaptcha_v3_enterprise_task_proxyless_s9(
&self,
task: &RecaptchaV3Task,
) -> Result<Solved<RecaptchaSolution>>
pub fn sync_solve_recaptcha_v3_enterprise_task_proxyless_s9( &self, task: &RecaptchaV3Task, ) -> Result<Solved<RecaptchaSolution>>
Runs the task through the synchronous endpoint and returns its decoded solution.
Solved::task_id carries the identifier this endpoint assigns
and returns alongside the result.
Whether a given type is accepted on this endpoint is the
service’s decision; a type it does not serve is rejected with
ERROR_TASK_TYPE_NOT_ALLOWED before anything is billed.
Sourcepub fn solve_funcaptcha_task_proxyless(
&self,
task: &FunCaptchaTask,
) -> Result<Solved<FunCaptchaSolution>>
pub fn solve_funcaptcha_task_proxyless( &self, task: &FunCaptchaTask, ) -> Result<Solved<FunCaptchaSolution>>
Creates the task, polls until it finishes, and returns its decoded solution.
The sync_-prefixed method runs the same type through the
synchronous endpoint instead.
Sourcepub fn sync_solve_funcaptcha_task_proxyless(
&self,
task: &FunCaptchaTask,
) -> Result<Solved<FunCaptchaSolution>>
pub fn sync_solve_funcaptcha_task_proxyless( &self, task: &FunCaptchaTask, ) -> Result<Solved<FunCaptchaSolution>>
Runs the task through the synchronous endpoint and returns its decoded solution.
Solved::task_id carries the identifier this endpoint assigns
and returns alongside the result.
Whether a given type is accepted on this endpoint is the
service’s decision; a type it does not serve is rejected with
ERROR_TASK_TYPE_NOT_ALLOWED before anything is billed.
Sourcepub fn solve_funcaptcha_classification(
&self,
task: &FunCaptchaClassificationTask,
) -> Result<Solved<FunCaptchaClassificationSolution>>
pub fn solve_funcaptcha_classification( &self, task: &FunCaptchaClassificationTask, ) -> Result<Solved<FunCaptchaClassificationSolution>>
Creates the task, polls until it finishes, and returns its decoded solution.
The sync_-prefixed method runs the same type through the
synchronous endpoint instead.
Sourcepub fn sync_solve_funcaptcha_classification(
&self,
task: &FunCaptchaClassificationTask,
) -> Result<Solved<FunCaptchaClassificationSolution>>
pub fn sync_solve_funcaptcha_classification( &self, task: &FunCaptchaClassificationTask, ) -> Result<Solved<FunCaptchaClassificationSolution>>
Runs the task through the synchronous endpoint and returns its decoded solution.
Solved::task_id carries the identifier this endpoint assigns
and returns alongside the result.
Whether a given type is accepted on this endpoint is the
service’s decision; a type it does not serve is rejected with
ERROR_TASK_TYPE_NOT_ALLOWED before anything is billed.
Sourcepub fn solve_perimeter_x(
&self,
task: &PerimeterXTask,
) -> Result<Solved<PerimeterXSolution>>
pub fn solve_perimeter_x( &self, task: &PerimeterXTask, ) -> Result<Solved<PerimeterXSolution>>
Creates the task, polls until it finishes, and returns its decoded solution.
The sync_-prefixed method runs the same type through the
synchronous endpoint instead.
Sourcepub fn sync_solve_perimeter_x(
&self,
task: &PerimeterXTask,
) -> Result<Solved<PerimeterXSolution>>
pub fn sync_solve_perimeter_x( &self, task: &PerimeterXTask, ) -> Result<Solved<PerimeterXSolution>>
Runs the task through the synchronous endpoint and returns its decoded solution.
Solved::task_id carries the identifier this endpoint assigns
and returns alongside the result.
Whether a given type is accepted on this endpoint is the
service’s decision; a type it does not serve is rejected with
ERROR_TASK_TYPE_NOT_ALLOWED before anything is billed.
Sourcepub fn solve_hcaptcha(
&self,
task: &HcaptchaTask,
) -> Result<Solved<HcaptchaSolution>>
pub fn solve_hcaptcha( &self, task: &HcaptchaTask, ) -> Result<Solved<HcaptchaSolution>>
Creates the task, polls until it finishes, and returns its decoded solution.
The sync_-prefixed method runs the same type through the
synchronous endpoint instead.
Sourcepub fn sync_solve_hcaptcha(
&self,
task: &HcaptchaTask,
) -> Result<Solved<HcaptchaSolution>>
pub fn sync_solve_hcaptcha( &self, task: &HcaptchaTask, ) -> Result<Solved<HcaptchaSolution>>
Runs the task through the synchronous endpoint and returns its decoded solution.
Solved::task_id carries the identifier this endpoint assigns
and returns alongside the result.
Whether a given type is accepted on this endpoint is the
service’s decision; a type it does not serve is rejected with
ERROR_TASK_TYPE_NOT_ALLOWED before anything is billed.
Sourcepub fn solve_hcaptcha_classification(
&self,
task: &HcaptchaClassificationTask,
) -> Result<Solved<HcaptchaClassificationSolution>>
pub fn solve_hcaptcha_classification( &self, task: &HcaptchaClassificationTask, ) -> Result<Solved<HcaptchaClassificationSolution>>
Creates the task, polls until it finishes, and returns its decoded solution.
The sync_-prefixed method runs the same type through the
synchronous endpoint instead.
Sourcepub fn sync_solve_hcaptcha_classification(
&self,
task: &HcaptchaClassificationTask,
) -> Result<Solved<HcaptchaClassificationSolution>>
pub fn sync_solve_hcaptcha_classification( &self, task: &HcaptchaClassificationTask, ) -> Result<Solved<HcaptchaClassificationSolution>>
Runs the task through the synchronous endpoint and returns its decoded solution.
Solved::task_id carries the identifier this endpoint assigns
and returns alongside the result.
Whether a given type is accepted on this endpoint is the
service’s decision; a type it does not serve is rejected with
ERROR_TASK_TYPE_NOT_ALLOWED before anything is billed.
Sourcepub fn solve_akamai_web_task_proxyless(
&self,
task: &AkamaiWebTask,
) -> Result<Solved<AkamaiWebSolution>>
pub fn solve_akamai_web_task_proxyless( &self, task: &AkamaiWebTask, ) -> Result<Solved<AkamaiWebSolution>>
Creates the task, polls until it finishes, and returns its decoded solution.
The sync_-prefixed method runs the same type through the
synchronous endpoint instead.
Sourcepub fn sync_solve_akamai_web_task_proxyless(
&self,
task: &AkamaiWebTask,
) -> Result<Solved<AkamaiWebSolution>>
pub fn sync_solve_akamai_web_task_proxyless( &self, task: &AkamaiWebTask, ) -> Result<Solved<AkamaiWebSolution>>
Runs the task through the synchronous endpoint and returns its decoded solution.
Solved::task_id carries the identifier this endpoint assigns
and returns alongside the result.
Whether a given type is accepted on this endpoint is the
service’s decision; a type it does not serve is rejected with
ERROR_TASK_TYPE_NOT_ALLOWED before anything is billed.
Sourcepub fn solve_akamai_sbsd_task_proxyless(
&self,
task: &AkamaiSbsdTask,
) -> Result<Solved<AkamaiSbsdSolution>>
pub fn solve_akamai_sbsd_task_proxyless( &self, task: &AkamaiSbsdTask, ) -> Result<Solved<AkamaiSbsdSolution>>
Creates the task, polls until it finishes, and returns its decoded solution.
The sync_-prefixed method runs the same type through the
synchronous endpoint instead.
Sourcepub fn sync_solve_akamai_sbsd_task_proxyless(
&self,
task: &AkamaiSbsdTask,
) -> Result<Solved<AkamaiSbsdSolution>>
pub fn sync_solve_akamai_sbsd_task_proxyless( &self, task: &AkamaiSbsdTask, ) -> Result<Solved<AkamaiSbsdSolution>>
Runs the task through the synchronous endpoint and returns its decoded solution.
Solved::task_id carries the identifier this endpoint assigns
and returns alongside the result.
Whether a given type is accepted on this endpoint is the
service’s decision; a type it does not serve is rejected with
ERROR_TASK_TYPE_NOT_ALLOWED before anything is billed.
Sourcepub fn solve_tls_task(
&self,
task: &TlsForwardTask,
) -> Result<Solved<TlsForwardSolution>>
pub fn solve_tls_task( &self, task: &TlsForwardTask, ) -> Result<Solved<TlsForwardSolution>>
Creates the task, polls until it finishes, and returns its decoded solution.
The sync_-prefixed method runs the same type through the
synchronous endpoint instead.
Sourcepub fn sync_solve_tls_task(
&self,
task: &TlsForwardTask,
) -> Result<Solved<TlsForwardSolution>>
pub fn sync_solve_tls_task( &self, task: &TlsForwardTask, ) -> Result<Solved<TlsForwardSolution>>
Runs the task through the synchronous endpoint and returns its decoded solution.
Solved::task_id carries the identifier this endpoint assigns
and returns alongside the result.
Whether a given type is accepted on this endpoint is the
service’s decision; a type it does not serve is rejected with
ERROR_TASK_TYPE_NOT_ALLOWED before anything is billed.
Sourcepub fn solve_cloudflare_5s_task(
&self,
task: &Cloudflare5sTask,
) -> Result<Solved<Cloudflare5sSolution>>
pub fn solve_cloudflare_5s_task( &self, task: &Cloudflare5sTask, ) -> Result<Solved<Cloudflare5sSolution>>
Creates the task, polls until it finishes, and returns its decoded solution.
The sync_-prefixed method runs the same type through the
synchronous endpoint instead.
Sourcepub fn sync_solve_cloudflare_5s_task(
&self,
task: &Cloudflare5sTask,
) -> Result<Solved<Cloudflare5sSolution>>
pub fn sync_solve_cloudflare_5s_task( &self, task: &Cloudflare5sTask, ) -> Result<Solved<Cloudflare5sSolution>>
Runs the task through the synchronous endpoint and returns its decoded solution.
Solved::task_id carries the identifier this endpoint assigns
and returns alongside the result.
Whether a given type is accepted on this endpoint is the
service’s decision; a type it does not serve is rejected with
ERROR_TASK_TYPE_NOT_ALLOWED before anything is billed.
Sourcepub fn solve_cloudflare_turnstile_task(
&self,
task: &CloudflareTurnstileTask,
) -> Result<Solved<CloudflareTurnstileSolution>>
pub fn solve_cloudflare_turnstile_task( &self, task: &CloudflareTurnstileTask, ) -> Result<Solved<CloudflareTurnstileSolution>>
Creates the task, polls until it finishes, and returns its decoded solution.
The sync_-prefixed method runs the same type through the
synchronous endpoint instead.
Sourcepub fn sync_solve_cloudflare_turnstile_task(
&self,
task: &CloudflareTurnstileTask,
) -> Result<Solved<CloudflareTurnstileSolution>>
pub fn sync_solve_cloudflare_turnstile_task( &self, task: &CloudflareTurnstileTask, ) -> Result<Solved<CloudflareTurnstileSolution>>
Runs the task through the synchronous endpoint and returns its decoded solution.
Solved::task_id carries the identifier this endpoint assigns
and returns alongside the result.
Whether a given type is accepted on this endpoint is the
service’s decision; a type it does not serve is rejected with
ERROR_TASK_TYPE_NOT_ALLOWED before anything is billed.
Sourcepub fn solve_data_dome_task_proxyless(
&self,
task: &DataDomeTask,
) -> Result<Solved<DataDomeSolution>>
pub fn solve_data_dome_task_proxyless( &self, task: &DataDomeTask, ) -> Result<Solved<DataDomeSolution>>
Creates the task, polls until it finishes, and returns its decoded solution.
The sync_-prefixed method runs the same type through the
synchronous endpoint instead.
Sourcepub fn sync_solve_data_dome_task_proxyless(
&self,
task: &DataDomeTask,
) -> Result<Solved<DataDomeSolution>>
pub fn sync_solve_data_dome_task_proxyless( &self, task: &DataDomeTask, ) -> Result<Solved<DataDomeSolution>>
Runs the task through the synchronous endpoint and returns its decoded solution.
Solved::task_id carries the identifier this endpoint assigns
and returns alongside the result.
Whether a given type is accepted on this endpoint is the
service’s decision; a type it does not serve is rejected with
ERROR_TASK_TYPE_NOT_ALLOWED before anything is billed.
Creates the task, polls until it finishes, and returns its decoded solution.
The sync_-prefixed method runs the same type through the
synchronous endpoint instead.
Runs the task through the synchronous endpoint and returns its decoded solution.
Solved::task_id carries the identifier this endpoint assigns
and returns alongside the result.
Whether a given type is accepted on this endpoint is the
service’s decision; a type it does not serve is rejected with
ERROR_TASK_TYPE_NOT_ALLOWED before anything is billed.
Sourcepub fn solve_incapsula_task_proxyless(
&self,
task: &IncapsulaTask,
) -> Result<Solved<IncapsulaSolution>>
pub fn solve_incapsula_task_proxyless( &self, task: &IncapsulaTask, ) -> Result<Solved<IncapsulaSolution>>
Creates the task, polls until it finishes, and returns its decoded solution.
The sync_-prefixed method runs the same type through the
synchronous endpoint instead.
Sourcepub fn sync_solve_incapsula_task_proxyless(
&self,
task: &IncapsulaTask,
) -> Result<Solved<IncapsulaSolution>>
pub fn sync_solve_incapsula_task_proxyless( &self, task: &IncapsulaTask, ) -> Result<Solved<IncapsulaSolution>>
Runs the task through the synchronous endpoint and returns its decoded solution.
Solved::task_id carries the identifier this endpoint assigns
and returns alongside the result.
Whether a given type is accepted on this endpoint is the
service’s decision; a type it does not serve is rejected with
ERROR_TASK_TYPE_NOT_ALLOWED before anything is billed.
Source§impl EzCapSolverClient
impl EzCapSolverClient
Sourcepub fn new() -> Result<Self>
pub fn new() -> Result<Self>
Creates a client with default configuration.
The client key is loaded from EZCAPSOLVER_API_KEY.
Sourcepub fn with_config(config: ClientConfig) -> Result<Self>
pub fn with_config(config: ClientConfig) -> Result<Self>
Creates a client with the supplied configuration.
If the configuration does not contain an explicit client key,
EZCAPSOLVER_API_KEY is loaded from the environment.
Sourcepub fn with_client_key(client_key: impl Into<String>) -> Result<Self>
pub fn with_client_key(client_key: impl Into<String>) -> Result<Self>
Creates a client with an explicit client key and default configuration.
Sourcepub fn with_http_client(config: ClientConfig, http: Client) -> Result<Self>
pub fn with_http_client(config: ClientConfig, http: Client) -> Result<Self>
Creates a client that sends through a caller-supplied HTTP client.
Use it to share a connection pool, or to install a middleware stack or a
custom TLS setup. ClientConfig::proxy and ClientConfig::user_agent
are not applied to it — the supplied client brings its own transport
and headers. Per-request timeouts still are.
Sourcepub const fn config(&self) -> &ClientConfig
pub const fn config(&self) -> &ClientConfig
Returns the active client configuration.
Sourcepub fn create_task<N, T>(
&self,
task_type: N,
task: &T,
) -> Result<CreateTaskResponse>
pub fn create_task<N, T>( &self, task_type: N, task: &T, ) -> Result<CreateTaskResponse>
Creates an asynchronous API task without waiting for completion.
The supplied task type is injected into the serialized parameter object.
Most callers should use Self::solve to create the task and wait for
its result in one call.
Sourcepub fn get_task_result(&self, task_id: &str) -> Result<TaskResult>
pub fn get_task_result(&self, task_id: &str) -> Result<TaskResult>
Queries the current result of an asynchronous API task.
This is called once per polling attempt, so it does not log on its own;
the caller records the attempt and TRACE records the exchange.
Sourcepub fn wait_for_result(&self, task_id: &str) -> Result<TaskResult>
pub fn wait_for_result(&self, task_id: &str) -> Result<TaskResult>
Waits for an existing asynchronous task using client polling settings.
Sourcepub fn wait_for_result_with(
&self,
task_id: &str,
polling: PollingConfig,
) -> Result<TaskResult>
pub fn wait_for_result_with( &self, task_id: &str, polling: PollingConfig, ) -> Result<TaskResult>
Waits for an existing asynchronous task using per-call polling settings.
Sourcepub fn solve<N, T>(&self, task_type: N, task: &T) -> Result<Solved<Solution>>
pub fn solve<N, T>(&self, task_type: N, task: &T) -> Result<Solved<Solution>>
Creates an asynchronous task and waits for its terminal result.
The supplied task type is injected into the serialized parameter object.
This is the recommended high-level method for asynchronous tasks.
Sourcepub fn solve_with<N, T>(
&self,
task_type: N,
task: &T,
polling: PollingConfig,
) -> Result<Solved<Solution>>
pub fn solve_with<N, T>( &self, task_type: N, task: &T, polling: PollingConfig, ) -> Result<Solved<Solution>>
Creates an asynchronous task and uses per-call polling settings.
Sourcepub fn sync_solve<N, T>(
&self,
task_type: N,
task: &T,
) -> Result<Solved<Solution>>
pub fn sync_solve<N, T>( &self, task_type: N, task: &T, ) -> Result<Solved<Solution>>
Runs a synchronous task and returns its raw solution without polling.
Accepts a known task type or a custom type name, with parameters that
serialize to a JSON object. Uses ClientConfig::sync_timeout.
Like Self::solve, returns Solved<Solution>, preserving the raw
solution, including a missing field or JSON null. Both Solved::task_id
and Solved::request_id come from the synchronous response.
Sourcepub fn create_sync_task<N, T>(
&self,
task_type: N,
task: &T,
) -> Result<TaskResult>
pub fn create_sync_task<N, T>( &self, task_type: N, task: &T, ) -> Result<TaskResult>
Creates a synchronous API task and returns its result.
The supplied task type is injected into the serialized parameter object.
Use Self::sync_solve to return the same aggregate as Self::solve.