pub enum AuthDecision {
Allow,
Deny(AuthDenyReason),
}Expand description
Describes whether an account is allowed to authenticate.
Variants§
Allow
Account may authenticate and use protected routes.
Deny(AuthDenyReason)
Account must not authenticate because of the supplied reason.
Implementations§
Source§impl AuthDecision
impl AuthDecision
Sourcepub fn is_allowed(&self) -> bool
pub fn is_allowed(&self) -> bool
Returns true when the decision allows authentication.
Sourcepub fn deny(reason: AuthDenyReason) -> Self
pub fn deny(reason: AuthDenyReason) -> Self
Builds a deny decision with the supplied reason.
Trait Implementations§
Source§impl Clone for AuthDecision
impl Clone for AuthDecision
Source§impl Debug for AuthDecision
impl Debug for AuthDecision
Source§impl<'de> Deserialize<'de> for AuthDecision
impl<'de> Deserialize<'de> for AuthDecision
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for AuthDecision
Source§impl PartialEq for AuthDecision
impl PartialEq for AuthDecision
Source§impl Serialize for AuthDecision
impl Serialize for AuthDecision
impl StructuralPartialEq for AuthDecision
Auto Trait Implementations§
impl Freeze for AuthDecision
impl RefUnwindSafe for AuthDecision
impl Send for AuthDecision
impl Sync for AuthDecision
impl Unpin for AuthDecision
impl UnsafeUnpin for AuthDecision
impl UnwindSafe for AuthDecision
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