pub struct CrawlerConfigBuilder { /* private fields */ }Expand description
Builder for CrawlerConfig
Following api-builder and api-must-use.
Implementations§
Source§impl CrawlerConfigBuilder
impl CrawlerConfigBuilder
Sourcepub fn include_pattern(self, pattern: impl Into<String>) -> Self
pub fn include_pattern(self, pattern: impl Into<String>) -> Self
Add an include pattern
Sourcepub fn include_patterns(self, patterns: Vec<String>) -> Self
pub fn include_patterns(self, patterns: Vec<String>) -> Self
Add multiple include patterns
Sourcepub fn exclude_pattern(self, pattern: impl Into<String>) -> Self
pub fn exclude_pattern(self, pattern: impl Into<String>) -> Self
Add an exclude pattern
Sourcepub fn exclude_patterns(self, patterns: Vec<String>) -> Self
pub fn exclude_patterns(self, patterns: Vec<String>) -> Self
Add multiple exclude patterns
Sourcepub fn concurrency(self, level: usize) -> Self
pub fn concurrency(self, level: usize) -> Self
Set concurrency level
Sourcepub fn user_agent(self, ua: impl Into<String>) -> Self
pub fn user_agent(self, ua: impl Into<String>) -> Self
Set user agent string
Sourcepub fn timeout_secs(self, secs: u64) -> Self
pub fn timeout_secs(self, secs: u64) -> Self
Set request timeout in seconds
Sourcepub fn use_sitemap(self, use_sitemap: bool) -> Self
pub fn use_sitemap(self, use_sitemap: bool) -> Self
Set use_sitemap flag (FASE 3)
Sourcepub fn sitemap_url(self, url: impl Into<String>) -> Self
pub fn sitemap_url(self, url: impl Into<String>) -> Self
Set explicit sitemap URL (FASE 3)
pub fn build(self) -> CrawlerConfig
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CrawlerConfigBuilder
impl RefUnwindSafe for CrawlerConfigBuilder
impl Send for CrawlerConfigBuilder
impl Sync for CrawlerConfigBuilder
impl Unpin for CrawlerConfigBuilder
impl UnsafeUnpin 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more