pub struct CrawlerConfigBuilder { /* private fields */ }Expand description
Builder for CrawlerConfig.
Implementations§
Source§impl CrawlerConfigBuilder
impl CrawlerConfigBuilder
Sourcepub fn page_limit(self, v: u32) -> Self
pub fn page_limit(self, v: u32) -> Self
Set page limit.
Sourcepub fn max_duration(self, v: u32) -> Self
pub fn max_duration(self, v: u32) -> Self
Set max duration (seconds).
Sourcepub fn max_api_credit(self, v: u32) -> Self
pub fn max_api_credit(self, v: u32) -> Self
Set max API credit.
Sourcepub fn exclude_paths(self, v: Vec<String>) -> Self
pub fn exclude_paths(self, v: Vec<String>) -> Self
Set exclude paths.
Sourcepub fn include_only_paths(self, v: Vec<String>) -> Self
pub fn include_only_paths(self, v: Vec<String>) -> Self
Set include-only paths.
Sourcepub fn ignore_base_path_restriction(self, v: bool) -> Self
pub fn ignore_base_path_restriction(self, v: bool) -> Self
Ignore base-path restriction.
Sourcepub fn follow_external_links(self, v: bool) -> Self
pub fn follow_external_links(self, v: bool) -> Self
Follow external links.
Sourcepub fn allowed_external_domains(self, v: Vec<String>) -> Self
pub fn allowed_external_domains(self, v: Vec<String>) -> Self
Set allowed external domains.
Sourcepub fn follow_internal_subdomains(self, v: bool) -> Self
pub fn follow_internal_subdomains(self, v: bool) -> Self
Tri-state follow-internal-subdomains.
Sourcepub fn allowed_internal_subdomains(self, v: Vec<String>) -> Self
pub fn allowed_internal_subdomains(self, v: Vec<String>) -> Self
Set allowed internal subdomains.
Sourcepub fn user_agent(self, v: impl Into<String>) -> Self
pub fn user_agent(self, v: impl Into<String>) -> Self
Set User-Agent.
Sourcepub fn max_concurrency(self, v: u32) -> Self
pub fn max_concurrency(self, v: u32) -> Self
Set max concurrency.
Sourcepub fn rendering_delay(self, v: u32) -> Self
pub fn rendering_delay(self, v: u32) -> Self
Set rendering delay (ms).
Sourcepub fn use_sitemaps(self, v: bool) -> Self
pub fn use_sitemaps(self, v: bool) -> Self
Honor sitemaps.
Sourcepub fn ignore_no_follow(self, v: bool) -> Self
pub fn ignore_no_follow(self, v: bool) -> Self
Ignore nofollow.
Sourcepub fn respect_robots_txt(self, v: bool) -> Self
pub fn respect_robots_txt(self, v: bool) -> Self
Tri-state respect-robots-txt.
Sourcepub fn cache_clear(self, v: bool) -> Self
pub fn cache_clear(self, v: bool) -> Self
Force cache refresh.
Sourcepub fn content_format(self, v: CrawlerContentFormat) -> Self
pub fn content_format(self, v: CrawlerContentFormat) -> Self
Add content format.
Sourcepub fn extraction_rules(self, v: Value) -> Self
pub fn extraction_rules(self, v: Value) -> Self
Set extraction rules.
Sourcepub fn proxy_pool(self, v: impl Into<String>) -> Self
pub fn proxy_pool(self, v: impl Into<String>) -> Self
Set proxy pool name.
Sourcepub fn webhook_name(self, v: impl Into<String>) -> Self
pub fn webhook_name(self, v: impl Into<String>) -> Self
Set webhook name.
Sourcepub fn webhook_event(self, v: CrawlerWebhookEvent) -> Self
pub fn webhook_event(self, v: CrawlerWebhookEvent) -> Self
Add webhook event.
Sourcepub fn build(self) -> Result<CrawlerConfig, ScrapflyError>
pub fn build(self) -> Result<CrawlerConfig, ScrapflyError>
Finalize the builder.
Trait Implementations§
Source§impl Clone for CrawlerConfigBuilder
impl Clone for CrawlerConfigBuilder
Source§fn clone(&self) -> CrawlerConfigBuilder
fn clone(&self) -> CrawlerConfigBuilder
Returns a copy 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 moreAuto Trait Implementations§
impl Freeze for CrawlerConfigBuilder
impl RefUnwindSafe for CrawlerConfigBuilder
impl Send for CrawlerConfigBuilder
impl Sync for CrawlerConfigBuilder
impl Unpin for CrawlerConfigBuilder
impl UnwindSafe for CrawlerConfigBuilder
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