pub enum ViolationAction {
Reject,
Pass,
RespondWith(Response<String>),
}Expand description
Action to take after evaluating a violation through OnViolation policy.
Variants§
Reject
Reject the request with the default error response.
Pass
Let the request through (ignored for Timeout violations).
RespondWith(Response<String>)
Respond with a fully custom HTTP response.
Trait Implementations§
Source§impl Default for ViolationAction
impl Default for ViolationAction
Source§fn default() -> ViolationAction
fn default() -> ViolationAction
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ViolationAction
impl !RefUnwindSafe for ViolationAction
impl Send for ViolationAction
impl Sync for ViolationAction
impl Unpin for ViolationAction
impl UnsafeUnpin for ViolationAction
impl !UnwindSafe for ViolationAction
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