pub struct CrawlerBuilder<S, D>where
S: Spider,
D: Downloader,{ /* private fields */ }Implementations§
Source§impl<S> CrawlerBuilder<S, ReqwestClientDownloader>where
S: Spider,
impl<S> CrawlerBuilder<S, ReqwestClientDownloader>where
S: Spider,
Sourcepub fn new(spider: S) -> CrawlerBuilder<S, ReqwestClientDownloader>
pub fn new(spider: S) -> CrawlerBuilder<S, ReqwestClientDownloader>
Creates a new CrawlerBuilder for a given spider with the default ReqwestClientDownloader.
Source§impl<S, D> CrawlerBuilder<S, D>where
S: Spider,
D: Downloader,
impl<S, D> CrawlerBuilder<S, D>where
S: Spider,
D: Downloader,
pub fn max_concurrent_downloads(self, limit: usize) -> CrawlerBuilder<S, D>
pub fn max_parser_workers(self, limit: usize) -> CrawlerBuilder<S, D>
pub fn max_concurrent_pipelines(self, limit: usize) -> CrawlerBuilder<S, D>
pub fn channel_capacity(self, capacity: usize) -> CrawlerBuilder<S, D>
pub fn downloader(self, downloader: D) -> CrawlerBuilder<S, D>
pub fn add_middleware<M>(self, middleware: M) -> CrawlerBuilder<S, D>
pub fn add_pipeline<P>(self, pipeline: P) -> CrawlerBuilder<S, D>
pub fn with_checkpoint_path<P>(self, path: P) -> CrawlerBuilder<S, D>
pub fn with_checkpoint_interval( self, interval: Duration, ) -> CrawlerBuilder<S, D>
pub async fn build( self, ) -> Result<Crawler<S, <D as Downloader>::Client>, SpiderError>
Trait Implementations§
Source§impl<S> Default for CrawlerBuilder<S, ReqwestClientDownloader>where
S: Spider,
impl<S> Default for CrawlerBuilder<S, ReqwestClientDownloader>where
S: Spider,
Source§fn default() -> CrawlerBuilder<S, ReqwestClientDownloader>
fn default() -> CrawlerBuilder<S, ReqwestClientDownloader>
Returns the “default value” for a type. Read more
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> UnsafeUnpin for CrawlerBuilder<S, D>where
D: UnsafeUnpin,
S: UnsafeUnpin,
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