pub struct Crawler<S: Spider, C> { /* private fields */ }Expand description
The central orchestrator for the web scraping process, handling requests, responses, items, concurrency, checkpointing, and statistics collection.
Implementations§
Source§impl<S, C> Crawler<S, C>
impl<S, C> Crawler<S, C>
Sourcepub async fn start_crawl(self) -> Result<(), SpiderError>
pub async fn start_crawl(self) -> Result<(), SpiderError>
Starts the crawl, orchestrating the scraping process, managing tasks, handling shutdown, checkpointing, and logging statistics.
Sourcepub fn get_stats(&self) -> Arc<StatCollector>
pub fn get_stats(&self) -> Arc<StatCollector>
Returns a cloned Arc to the StatCollector instance used by this crawler.
This allows programmatic access to the collected statistics at any time during or after the crawl.
Auto Trait Implementations§
impl<S, C> Freeze for Crawler<S, C>
impl<S, C> !RefUnwindSafe for Crawler<S, C>
impl<S, C> Send for Crawler<S, C>
impl<S, C> Sync for Crawler<S, C>
impl<S, C> Unpin for Crawler<S, C>
impl<S, C> !UnwindSafe for Crawler<S, C>
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