Module warp::filters::reply

source ·
Expand description

Reply Filters

These “filters” behave a little differently than the rest. Instead of being used directly on requests, these filters “wrap” other filters.

Wrapping a Filter (with)

use warp::Filter;

let with_server = warp::reply::with::header("server", "warp");

let route = warp::any()

Wrapping allows adding in conditional logic before the request enters the inner filter (though the with::header wrapper does not).