pub enum ResponseReason {
RateLimited(Policy),
Error(RateLimitError),
}Expand description
The structured reason passed to a ResponseFactory.
Variants§
RateLimited(Policy)
The complete policy state after the request exceeded its resolved quota.
Error(RateLimitError)
The middleware could not resolve or charge the request’s policy.
Implementations§
Source§impl ResponseReason
impl ResponseReason
Sourcepub const fn status_code(&self) -> StatusCode
pub const fn status_code(&self) -> StatusCode
Return the default HTTP status for this reason.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ResponseReason
impl RefUnwindSafe for ResponseReason
impl Send for ResponseReason
impl Sync for ResponseReason
impl Unpin for ResponseReason
impl UnsafeUnpin for ResponseReason
impl UnwindSafe for ResponseReason
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