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
Auto Trait Implementations§
impl Forget for AuthDecision
impl Freeze for AuthDecision
impl Move for AuthDecision
impl RefUnwindSafe for AuthDecision
impl Send for AuthDecisionwhere
RawVecInner: Send,
impl Sync for AuthDecisionwhere
RawVecInner: Sync,
impl Unpin for AuthDecision
impl UnsafeUnpin for AuthDecisionwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for AuthDecisionwhere
RawVecInner: UnwindSafe,
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