Skip to main content

layer

Function layer 

Source
pub async fn layer(req: Request, next: Next) -> Response
Expand description

Attach validators and directives, and answer If-None-Match with 304.

Only 2xx responses get an ETag; an error body is not a cacheable representation of the resource, and giving a 404 a validator invites a client to revalidate its way into believing the page still doesn’t exist.