Warp: Expose CombineRejection in public API

Created on 5 Nov 2019  路  3Comments  路  Source: seanmonstar/warp

Without it, it is difficult to write helper functions that take filters as arguments and combine them with others, since warp built-in filter combinators often have bounds involving CombineRejection, which cannot be propagated to the signature of the helper function.

Most helpful comment

It would be nice if all of the filters (e.g. And, AndThen, etc) were made public. Currently, the generated documentation makes it impossible to see what these things actually are.

image

All 3 comments

It would be nice if all of the filters (e.g. And, AndThen, etc) were made public. Currently, the generated documentation makes it impossible to see what these things actually are.

image

@dylanede can you show what you are trying to achieve?
@aloucks see https://github.com/seanmonstar/warp/issues/607#issuecomment-650448029

I would like to be able to put some of my filters into a separate function, but I can't return the result of that function in such a way that they can be used, because I can't name the return type, and also can't use impl Trait, since the return type involves a closure, and the trait required is not public.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

richardanaya picture richardanaya  路  6Comments

seanmonstar picture seanmonstar  路  3Comments

nerdrew picture nerdrew  路  4Comments

Newbytee picture Newbytee  路  7Comments

asaaki picture asaaki  路  7Comments