Trait warp::reject::sealed::CombineRejection
source · pub trait CombineRejection<E>: Send + Sized {
type One: IsReject + From<Self> + From<E> + Into<Rejection>;
type Combined: IsReject;
// Required method
fn combine(self, other: E) -> Self::Combined;
}
Required Associated Types§
sourcetype One: IsReject + From<Self> + From<E> + Into<Rejection>
type One: IsReject + From<Self> + From<E> + Into<Rejection>
The type that should be returned when only 1 of the two “rejections” occurs.
§For example:
warp::any().and(warp::path("foo"))
has the following steps:
- Since this is
and
, only one of the rejections will occur, and as soon as it does, it will be returned. warp::any()
rejects withNever
. So, it will never returnNever
.warp::path()
rejects withRejection
. It may returnRejection
.
Thus, if the above filter rejects, it will definitely be Rejection
.
Required Methods§
Object Safety§
This trait is not object safe.