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§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.