pub trait Reject: Debug + Sized + Send + Sync + 'static { }
Expand description
A marker trait to ensure proper types are used for custom rejections.
Can be converted into Rejection.
§Example
use warp::{Filter, reject::Reject};
#[derive(Debug)]
struct RateLimited;
impl Reject for RateLimited {}
let route = warp::any().and_then(|| async {
Err::<(), _>(warp::reject::custom(RateLimited))
});
Object Safety§
This trait is not object safe.