Struct saphir::http_context::HttpContext
source · pub struct HttpContext {
pub state: State,
pub operation_id: OperationId,
pub metadata: HandlerMetadata,
/* private fields */
}
Expand description
Context representing the relationship between a request and a response This structure only appears inside Middleware since the act before and after the request
There is no guaranty the the request nor the response will be set at any given time, since they could be moved out by a badly implemented middleware
Fields§
§state: State
The incoming request Before
it is handled by the router
OR
The outgoing response After
the request was handled by the router
operation_id: OperationId
Available on crate feature
operation
only.Unique Identifier of the current request->response chain
metadata: HandlerMetadata