pub struct SecurityContext { /* private fields */ }Expand description
Security context for a connection
Implementations§
Source§impl SecurityContext
impl SecurityContext
Sourcepub fn authenticated(session: SessionId, level: AuthLevel) -> Self
pub fn authenticated(session: SessionId, level: AuthLevel) -> Self
Create authenticated context
Sourcepub fn can_execute(&self, verb: Verb) -> bool
pub fn can_execute(&self, verb: Verb) -> bool
Check if a verb is permitted
Sourcepub fn is_authenticated(&self) -> bool
pub fn is_authenticated(&self) -> bool
Check if authenticated at all
Trait Implementations§
Source§impl Clone for SecurityContext
impl Clone for SecurityContext
Source§fn clone(&self) -> SecurityContext
fn clone(&self) -> SecurityContext
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 moreSource§impl Debug for SecurityContext
impl Debug for SecurityContext
Auto Trait Implementations§
impl Freeze for SecurityContext
impl RefUnwindSafe for SecurityContext
impl Send for SecurityContext
impl Sync for SecurityContext
impl Unpin for SecurityContext
impl UnsafeUnpin for SecurityContext
impl UnwindSafe for SecurityContext
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