pub struct ProxyTesterOptions { /* private fields */ }
Implementations§
Source§impl ProxyTesterOptions
impl ProxyTesterOptions
Sourcepub fn new() -> ProxyTesterOptions
pub fn new() -> ProxyTesterOptions
Create a new ProxyTesterOptions
This is the builder for the ProxyTester.
§Examples
use proxytester::{ProxyTesterOptions, ProxyFormat};
use std::time::Duration;
let proxy_tester = ProxyTesterOptions::new()
.set_format(ProxyFormat::HostPortUsernamePassword)
.set_url("https://example.com".to_owned())
.set_workers(10)
.set_timeout(Duration::from_millis(5000))
.build();
Sourcepub fn set_format(self, format: ProxyFormat) -> Self
pub fn set_format(self, format: ProxyFormat) -> Self
Set the format of the proxies
This is a fluent setter method which must be chained or used as it consumes self.
See ProxyTesterOptions for more information.
Sourcepub fn set_workers(self, workers: usize) -> Self
pub fn set_workers(self, workers: usize) -> Self
Set the amount of workers
This is a fluent setter method which must be chained or used as it consumes self.
See ProxyTesterOptions for more information.
Sourcepub fn set_timeout(self, timeout: Duration) -> Self
pub fn set_timeout(self, timeout: Duration) -> Self
Set the timeout duration
This is a fluent setter method which must be chained or used as it consumes self.
See ProxyTesterOptions for more information.
Sourcepub fn set_url(self, url: String) -> Self
pub fn set_url(self, url: String) -> Self
Set the URL that the proxies will be tested against
This is a fluent setter method which must be chained or used as it consumes self.
See ProxyTesterOptions for more information.
Sourcepub fn build(self) -> ProxyTester
pub fn build(self) -> ProxyTester
Build the ProxyTester
This is a fluent setter method which must be chained or used as it consumes self.
See ProxyTesterOptions for more information.