pub struct BitmaskAuth {
pub roles: u32,
pub id: String,
}Expand description
The legacy bitmask-based auth context.
Wraps the old (roles: u32, id: String) pair for use with the generic
RuleMatcher<A> system. AclRuleFilter implements RuleMatcher<BitmaskAuth>.
Fields§
§roles: u32Role bitmask (u32).
id: StringUser/session ID.
Trait Implementations§
Source§impl<E, I, B> AuthExtractor<BitmaskAuth, B> for BitmaskAuthExtractor<E, I>where
E: RoleExtractor<B>,
I: IdExtractor<B>,
impl<E, I, B> AuthExtractor<BitmaskAuth, B> for BitmaskAuthExtractor<E, I>where
E: RoleExtractor<B>,
I: IdExtractor<B>,
Source§fn extract_auth(&self, request: &Request<B>) -> AuthResult<BitmaskAuth>
fn extract_auth(&self, request: &Request<B>) -> AuthResult<BitmaskAuth>
Extract auth context from the request.
Source§impl Clone for BitmaskAuth
impl Clone for BitmaskAuth
Source§fn clone(&self) -> BitmaskAuth
fn clone(&self) -> BitmaskAuth
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 BitmaskAuth
impl Debug for BitmaskAuth
Source§impl RuleMatcher<BitmaskAuth> for AclRuleFilter
impl RuleMatcher<BitmaskAuth> for AclRuleFilter
Source§fn matches(&self, auth: &BitmaskAuth, meta: &RequestMeta) -> bool
fn matches(&self, auth: &BitmaskAuth, meta: &RequestMeta) -> bool
Check if this matcher allows the given auth context for the request.
Source§fn description(&self) -> Option<&str>
fn description(&self) -> Option<&str>
Optional human-readable description for logging.
Auto Trait Implementations§
impl Freeze for BitmaskAuth
impl RefUnwindSafe for BitmaskAuth
impl Send for BitmaskAuth
impl Sync for BitmaskAuth
impl Unpin for BitmaskAuth
impl UnsafeUnpin for BitmaskAuth
impl UnwindSafe for BitmaskAuth
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