pub struct CrawlerEnv { /* private fields */ }Expand description
Shared process-level state supplied to crawler lifecycle hooks.
Implementations§
Source§impl CrawlerEnv
impl CrawlerEnv
Sourcepub fn stats(&self) -> &StatisticsHandle
pub fn stats(&self) -> &StatisticsHandle
Returns the live statistics handle.
Sourcepub fn config(&self) -> &Configuration
pub fn config(&self) -> &Configuration
Returns the resolved crawler configuration.
Sourcepub fn storage_client(&self) -> Option<&Arc<dyn StorageClient>>
pub fn storage_client(&self) -> Option<&Arc<dyn StorageClient>>
Returns the resolved storage client used by the crawler.
Sourcepub fn kvs(&self) -> Option<&Arc<dyn KeyValueStore>>
pub fn kvs(&self) -> Option<&Arc<dyn KeyValueStore>>
Returns the crawler’s resolved key-value store.
Sourcepub fn request_queue(&self) -> &Arc<dyn RequestQueue>
pub fn request_queue(&self) -> &Arc<dyn RequestQueue>
Returns the crawler’s request queue.
Sourcepub fn handle(&self) -> CrawlerHandle
pub fn handle(&self) -> CrawlerHandle
Creates a weak handle to the crawler.
Auto Trait Implementations§
impl !RefUnwindSafe for CrawlerEnv
impl !UnwindSafe for CrawlerEnv
impl Freeze for CrawlerEnv
impl Send for CrawlerEnv
impl Sync for CrawlerEnv
impl Unpin for CrawlerEnv
impl UnsafeUnpin for CrawlerEnv
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