pub struct AutoThrottleMiddleware { /* private fields */ }Expand description
Middleware that adapts pacing dynamically based on response feedback.
Implementations§
Source§impl AutoThrottleMiddleware
impl AutoThrottleMiddleware
Sourcepub fn builder() -> AutoThrottleMiddlewareBuilder
pub fn builder() -> AutoThrottleMiddlewareBuilder
Creates a new builder for AutoThrottleMiddleware.
Trait Implementations§
Source§impl Default for AutoThrottleMiddleware
impl Default for AutoThrottleMiddleware
Source§impl<C: Send + Sync> Middleware<C> for AutoThrottleMiddleware
impl<C: Send + Sync> Middleware<C> for AutoThrottleMiddleware
Source§fn process_request<'life0, 'life1, 'async_trait>(
&'life0 self,
_client: &'life1 C,
request: Request,
) -> Pin<Box<dyn Future<Output = Result<MiddlewareAction<Request>, SpiderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn process_request<'life0, 'life1, 'async_trait>(
&'life0 self,
_client: &'life1 C,
request: Request,
) -> Pin<Box<dyn Future<Output = Result<MiddlewareAction<Request>, SpiderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Intercepts an outgoing request before the downloader runs. Read more
Source§fn process_response<'life0, 'async_trait>(
&'life0 self,
response: Response,
) -> Pin<Box<dyn Future<Output = Result<MiddlewareAction<Response>, SpiderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn process_response<'life0, 'async_trait>(
&'life0 self,
response: Response,
) -> Pin<Box<dyn Future<Output = Result<MiddlewareAction<Response>, SpiderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Intercepts a successful response after download. Read more
Source§fn handle_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_request: &'life1 Request,
error: &'life2 SpiderError,
) -> Pin<Box<dyn Future<Output = Result<MiddlewareAction<Request>, SpiderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_request: &'life1 Request,
error: &'life2 SpiderError,
) -> Pin<Box<dyn Future<Output = Result<MiddlewareAction<Request>, SpiderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handles downloader errors for a request. Read more
Auto Trait Implementations§
impl Freeze for AutoThrottleMiddleware
impl !RefUnwindSafe for AutoThrottleMiddleware
impl Send for AutoThrottleMiddleware
impl Sync for AutoThrottleMiddleware
impl Unpin for AutoThrottleMiddleware
impl !UnwindSafe for AutoThrottleMiddleware
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