Skip to main content

Module middleware

Module middleware 

Source
Expand description

Core Middleware trait and related types for the spider-lib framework.

This module defines the Middleware trait, which is a fundamental abstraction for injecting custom logic into the web crawling pipeline. Middlewares can intercept and modify Requests before they are sent, Responses after they are received, and handle errors that occur during the process.

The MiddlewareAction enum provides a flexible way for middlewares to control the subsequent flow of execution, allowing actions such as continuing processing, retrying a request, dropping an item, or directly returning a response.

Enums§

MiddlewareAction
Enum returned by middleware methods to control further processing.

Traits§

Middleware
A trait for processing requests and responses.