pub struct CrawlerHandle { /* private fields */ }Expand description
A cheaply cloned weak back-reference to a running crawler.
Implementations§
Source§impl CrawlerHandle
impl CrawlerHandle
Sourcepub async fn add_requests(
&self,
reqs: impl IntoIterator<Item = Request> + Send,
) -> Result<BatchAddHandle, CrawlError>
pub async fn add_requests( &self, reqs: impl IntoIterator<Item = Request> + Send, ) -> Result<BatchAddHandle, CrawlError>
Adds requests to the crawler’s queue.
Sourcepub async fn add_requests_with_options(
&self,
reqs: impl IntoIterator<Item = Request> + Send,
options: AddOptions,
) -> Result<BatchAddHandle, CrawlError>
pub async fn add_requests_with_options( &self, reqs: impl IntoIterator<Item = Request> + Send, options: AddOptions, ) -> Result<BatchAddHandle, CrawlError>
Adds requests with explicit queue insertion options.
Sourcepub fn stats(&self) -> Option<StatisticsSnapshot>
pub fn stats(&self) -> Option<StatisticsSnapshot>
Returns a snapshot of live crawl statistics while the crawler exists.
Sourcepub fn autoscaler_snapshot(&self) -> Option<AutoscalerSnapshot>
pub fn autoscaler_snapshot(&self) -> Option<AutoscalerSnapshot>
Returns a snapshot of the concurrency scaler while the crawler exists.
Sourcepub fn events(&self) -> Option<EventStream>
pub fn events(&self) -> Option<EventStream>
Subscribes to control-plane crawler events while the crawler exists.
Sourcepub fn results(&self) -> Option<ResultStream>
pub fn results(&self) -> Option<ResultStream>
Subscribes to terminal request snapshots while the crawler exists.
Sourcepub fn request_queue(&self) -> Option<Arc<dyn RequestQueue>>
pub fn request_queue(&self) -> Option<Arc<dyn RequestQueue>>
Returns the crawler’s request queue while the crawler exists.
Sourcepub fn crawl_policy(&self) -> Option<Arc<CrawlPolicy>>
pub fn crawl_policy(&self) -> Option<Arc<CrawlPolicy>>
Returns the configured crawl policy while the crawler exists.
Trait Implementations§
Source§impl Clone for CrawlerHandle
impl Clone for CrawlerHandle
Source§fn clone(&self) -> CrawlerHandle
fn clone(&self) -> CrawlerHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 !RefUnwindSafe for CrawlerHandle
impl !UnwindSafe for CrawlerHandle
impl Freeze for CrawlerHandle
impl Send for CrawlerHandle
impl Sync for CrawlerHandle
impl Unpin for CrawlerHandle
impl UnsafeUnpin for CrawlerHandle
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