pub struct CrawlerBuilder<S: Spider, D>where
D: Downloader,{ /* private fields */ }Implementations§
Source§impl<S: Spider> CrawlerBuilder<S, ReqwestClientDownloader>
impl<S: Spider> CrawlerBuilder<S, ReqwestClientDownloader>
Source§impl<S: Spider, D: Downloader> CrawlerBuilder<S, D>
impl<S: Spider, D: Downloader> CrawlerBuilder<S, D>
Sourcepub fn max_concurrent_downloads(self, limit: usize) -> Self
pub fn max_concurrent_downloads(self, limit: usize) -> Self
Sets the maximum number of concurrent downloads.
Sourcepub fn max_parser_workers(self, limit: usize) -> Self
pub fn max_parser_workers(self, limit: usize) -> Self
Sets the maximum number of concurrent parser workers.
Sourcepub fn max_concurrent_pipelines(self, limit: usize) -> Self
pub fn max_concurrent_pipelines(self, limit: usize) -> Self
Sets the maximum number of concurrent pipelines.
Sourcepub fn channel_capacity(self, capacity: usize) -> Self
pub fn channel_capacity(self, capacity: usize) -> Self
Sets the capacity of communication channels between components.
Sourcepub fn downloader(self, downloader: D) -> Self
pub fn downloader(self, downloader: D) -> Self
Sets a custom downloader for the crawler.
Sourcepub fn add_middleware<M>(self, middleware: M) -> Self
pub fn add_middleware<M>(self, middleware: M) -> Self
Adds a middleware to the crawler.
Sourcepub fn add_pipeline<P>(self, pipeline: P) -> Self
pub fn add_pipeline<P>(self, pipeline: P) -> Self
Adds an item pipeline to the crawler.
Sourcepub fn with_checkpoint_path<P: AsRef<Path>>(self, path: P) -> Self
pub fn with_checkpoint_path<P: AsRef<Path>>(self, path: P) -> Self
Enables checkpointing and sets the path for the checkpoint file.
Sourcepub fn with_checkpoint_interval(self, interval: Duration) -> Self
pub fn with_checkpoint_interval(self, interval: Duration) -> Self
Sets the interval for periodic checkpointing.
Trait Implementations§
Source§impl<S: Spider> Default for CrawlerBuilder<S, ReqwestClientDownloader>
impl<S: Spider> Default for CrawlerBuilder<S, ReqwestClientDownloader>
Auto Trait Implementations§
impl<S, D> Freeze for CrawlerBuilder<S, D>
impl<S, D> !RefUnwindSafe for CrawlerBuilder<S, D>
impl<S, D> Send for CrawlerBuilder<S, D>
impl<S, D> Sync for CrawlerBuilder<S, D>
impl<S, D> Unpin for CrawlerBuilder<S, D>
impl<S, D> !UnwindSafe for CrawlerBuilder<S, D>
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