pub struct SecurityScope<'a> {
pub policy: &'a DataAccessPolicy,
pub mode: AuthorizationMode,
/* private fields */
}Expand description
Compiled security scope bound to one policy generation.
Fields§
§policy: &'a DataAccessPolicyPolicy supplying the label grants, relationship denials, and masks.
mode: AuthorizationModeMode controlling how strictly the policy is applied.
Implementations§
Source§impl<'a> SecurityScope<'a>
impl<'a> SecurityScope<'a>
Sourcepub fn compile(policy: &'a DataAccessPolicy, mode: AuthorizationMode) -> Self
pub fn compile(policy: &'a DataAccessPolicy, mode: AuthorizationMode) -> Self
Compiles policy under mode and records its stable fingerprint.
Sourcepub fn fingerprint(&self) -> u64
pub fn fingerprint(&self) -> u64
Returns the stable fingerprint identifying this policy generation.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for SecurityScope<'a>
impl<'a> RefUnwindSafe for SecurityScope<'a>
impl<'a> Send for SecurityScope<'a>
impl<'a> Sync for SecurityScope<'a>
impl<'a> Unpin for SecurityScope<'a>
impl<'a> UnsafeUnpin for SecurityScope<'a>
impl<'a> UnwindSafe for SecurityScope<'a>
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