pub struct GuardRejection {
pub status: StatusCode,
pub message: String,
}Expand description
A guard rejection with an HTTP status code and message.
Guards return this instead of a plain error string so the HTTP layer can respond with the correct status code (e.g., 401, 403, 413, 429).
Fields§
§status: StatusCode§message: StringImplementations§
Trait Implementations§
Source§impl Clone for GuardRejection
impl Clone for GuardRejection
Source§fn clone(&self) -> GuardRejection
fn clone(&self) -> GuardRejection
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GuardRejection
impl RefUnwindSafe for GuardRejection
impl Send for GuardRejection
impl Sync for GuardRejection
impl Unpin for GuardRejection
impl UnsafeUnpin for GuardRejection
impl UnwindSafe for GuardRejection
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