pub enum AuthDecision {
Allow(AuthContext),
Deny(AuthDeny),
}Expand description
Authentication decision with optional auth context
Variants§
Allow(AuthContext)
Connection is authorized with the given context
Deny(AuthDeny)
Connection is denied
Implementations§
Source§impl AuthDecision
impl AuthDecision
Sourcepub fn is_allowed(&self) -> bool
pub fn is_allowed(&self) -> bool
Check if the decision is Allow
Sourcepub fn auth_context(&self) -> Option<&AuthContext>
pub fn auth_context(&self) -> Option<&AuthContext>
Get the auth context if allowed
Trait Implementations§
Source§impl Clone for AuthDecision
impl Clone for AuthDecision
Source§fn clone(&self) -> AuthDecision
fn clone(&self) -> AuthDecision
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 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