Hi! New warp user here. I'm trying to return an or'ed filter from a function, but I don't uderstand what it wants from me.
I think that the issue is that Or's Exact assiciated type is this:
Extract = (Either<T::Extract, U::Extract>,)
and BoxedFilter
expects it, but the Eithe
r type is private.
I can try to rework the code to not bother with function return, but I'm curious what could be a solution.
fn api_entry(state: State) -> BoxedFilter<(impl Reply, )> // WHAT is a correct type here?{
.....
warp::path::end()
.or(session_get)
.or(session_stop)
.or(new_task).boxed()
}
fn api_entry(state: State) -> BoxedFilter<(impl Reply,)> {
| ^^^^^^^^^^ the trait `warp::Reply` is not implemented for `()`
|
= note: required because of the requirements on the impl of `warp::Reply` for `warp::generic::Either<(), (impl warp::Reply,)>`
= note: 4 redundant requirements hidden
= note: required because of the requirements on the impl of `warp::Reply` for `warp::generic::Either<(warp::generic::Either<(warp::generic::Either<(), (impl warp::Reply,)>,), (impl warp::Reply,)>,), (impl warp::Reply,)>`