pub enum LimitRejection<R> {
KeyExtractionFailure(R),
RateLimitExceeded,
}Expand description
Enumerates possible failure modes for rate limiting when extracting from request parts.
Variants§
KeyExtractionFailure(R)
Indicates a failure during key extraction, storing the underlying rejection reason.
RateLimitExceeded
Indicates that the rate limit has been exceeded.
Trait Implementations§
Source§impl<R: Debug> Debug for LimitRejection<R>
impl<R: Debug> Debug for LimitRejection<R>
Source§impl<R: Display> Display for LimitRejection<R>
impl<R: Display> Display for LimitRejection<R>
Source§impl<R: Error + 'static> Error for LimitRejection<R>
impl<R: Error + 'static> Error for LimitRejection<R>
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl<R: IntoResponse> IntoResponse for LimitRejection<R>
impl<R: IntoResponse> IntoResponse for LimitRejection<R>
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Create a response.
Auto Trait Implementations§
impl<R> Freeze for LimitRejection<R>where
R: Freeze,
impl<R> RefUnwindSafe for LimitRejection<R>where
R: RefUnwindSafe,
impl<R> Send for LimitRejection<R>where
R: Send,
impl<R> Sync for LimitRejection<R>where
R: Sync,
impl<R> Unpin for LimitRejection<R>where
R: Unpin,
impl<R> UnwindSafe for LimitRejection<R>where
R: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more