pub struct CrawlerConfig {
pub max_concurrent_downloads: usize,
pub parser_workers: usize,
pub max_concurrent_pipelines: usize,
pub channel_capacity: usize,
}Expand description
Core configuration for the crawler’s concurrency settings.
This struct holds tunable parameters that control the parallelism and throughput of the crawler.
Fields§
§max_concurrent_downloads: usizeThe maximum number of concurrent downloads.
parser_workers: usizeThe number of workers dedicated to parsing responses.
max_concurrent_pipelines: usizeThe maximum number of concurrent item processing pipelines.
channel_capacity: usizeThe capacity of communication channels between components.
Implementations§
Source§impl CrawlerConfig
impl CrawlerConfig
Sourcepub fn with_max_concurrent_downloads(self, limit: usize) -> Self
pub fn with_max_concurrent_downloads(self, limit: usize) -> Self
Sets the maximum number of concurrent downloads.
Sourcepub fn with_parser_workers(self, count: usize) -> Self
pub fn with_parser_workers(self, count: usize) -> Self
Sets the number of parser workers.
Sourcepub fn with_max_concurrent_pipelines(self, limit: usize) -> Self
pub fn with_max_concurrent_pipelines(self, limit: usize) -> Self
Sets the maximum number of concurrent pipelines.
Sourcepub fn with_channel_capacity(self, capacity: usize) -> Self
pub fn with_channel_capacity(self, capacity: usize) -> Self
Sets the channel capacity.
Trait Implementations§
Source§impl Clone for CrawlerConfig
impl Clone for CrawlerConfig
Source§fn clone(&self) -> CrawlerConfig
fn clone(&self) -> CrawlerConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CrawlerConfig
impl Debug for CrawlerConfig
Auto Trait Implementations§
impl Freeze for CrawlerConfig
impl RefUnwindSafe for CrawlerConfig
impl Send for CrawlerConfig
impl Sync for CrawlerConfig
impl Unpin for CrawlerConfig
impl UnsafeUnpin for CrawlerConfig
impl UnwindSafe for CrawlerConfig
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