warp::filters::reject_all
, a convenience filter which will always reject.
#999
Labels
feature
New feature or request
Is your feature request related to a problem? Please describe.
Writing macros to
Filter::or
together several filters is harder than it needs to be, as you must use recursion or write your own always-rejecting filter to put at the top.For example:
Describe the solution you'd like
A simple filter which is the opposite of
warp::any()
:warp::reject_all()
. This filter will reject anything that hits it, passing it down to then nextFilter::or
'd filter.The one I came up with to use on my own is:
Describe alternatives you've considered
Using macro recursion or writing my own filter.
The text was updated successfully, but these errors were encountered: