pub struct Denial { /* private fields */ }Expand description
A refusal from a gate: what the visitor sees, and a stable code for logs and events (never shown to the visitor).
Implementations§
Source§impl Denial
impl Denial
404 Not Found, hiding that the resource exists.
Sourcepub const fn status(status: u16, code: &'static str) -> Self
pub const fn status(status: u16, code: &'static str) -> Self
Another client-error status. A status outside 400 to 499 is answered as 403: a gate cannot turn a denial into a success or a server error.
Sourcepub const fn kind(&self) -> DenialKind
pub const fn kind(&self) -> DenialKind
What the visitor is told.
Sourcepub const fn status_code(&self) -> u16
pub const fn status_code(&self) -> u16
The status answered when no sign-in page applies.
Trait Implementations§
impl Copy for Denial
impl Eq for Denial
Source§impl Error for Denial
impl Error for Denial
1.30.0 · 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()
impl StructuralPartialEq for Denial
Auto Trait Implementations§
impl Forget for Denial
impl Freeze for Denial
impl RefUnwindSafe for Denial
impl Send for Denial
impl Sync for Denial
impl Unpin for Denial
impl UnsafeUnpin for Denial
impl UnwindSafe for Denial
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