warp::reject::sealed

Trait 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§

Source

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:

  1. Since this is and, only one of the rejections will occur, and as soon as it does, it will be returned.
  2. warp::any() rejects with Never. So, it will never return Never.
  3. warp::path() rejects with Rejection. It may return Rejection.

Thus, if the above filter rejects, it will definitely be Rejection.

Source

type Combined: IsReject

The type that should be returned when both rejections occur, and need to be combined.

Required Methods§

Source

fn combine(self, other: E) -> Self::Combined

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.

Implementations on Foreign Types§

Source§

impl CombineRejection<Infallible> for Infallible

Source§

impl CombineRejection<Rejection> for Infallible

Implementors§