pub struct AutoscaledPool { /* private fields */ }Expand description
Concurrency decision and politeness facade consulted by a crawler dispatch loop.
Implementations§
Source§impl AutoscaledPool
impl AutoscaledPool
Sourcepub fn new(options: AutoscaledPoolOptions) -> Self
pub fn new(options: AutoscaledPoolOptions) -> Self
Creates a pool, normalizing concurrency bounds and selecting its scaling mode.
Sourcepub fn desired_concurrency(&self) -> usize
pub fn desired_concurrency(&self) -> usize
Returns the concurrency currently desired by the selected mode.
Sourcepub fn min_concurrency(&self) -> usize
pub fn min_concurrency(&self) -> usize
Returns the effective minimum concurrency.
Sourcepub fn max_concurrency(&self) -> usize
pub fn max_concurrency(&self) -> usize
Returns the effective maximum concurrency.
Sourcepub fn set_domain_delay_floor(&self, host: &str, floor: Duration)
pub fn set_domain_delay_floor(&self, host: &str, floor: Duration)
Sets a persistent minimum delay between reservations for one host.
Auto Trait Implementations§
impl !Freeze for AutoscaledPool
impl !RefUnwindSafe for AutoscaledPool
impl !UnwindSafe for AutoscaledPool
impl Send for AutoscaledPool
impl Sync for AutoscaledPool
impl Unpin for AutoscaledPool
impl UnsafeUnpin for AutoscaledPool
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