pub struct PolicyContext {
pub tenant_id: Option<String>,
pub user_id: Option<String>,
pub action: PolicyAction,
pub metadata: HashMap<String, String>,
}Expand description
Context for policy evaluation
Fields§
§tenant_id: Option<String>Tenant ID (if multi-tenant)
user_id: Option<String>User ID
action: PolicyActionCurrent action being evaluated
metadata: HashMap<String, String>Additional metadata
Trait Implementations§
Source§impl Clone for PolicyContext
impl Clone for PolicyContext
Source§fn clone(&self) -> PolicyContext
fn clone(&self) -> PolicyContext
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 PolicyContext
impl RefUnwindSafe for PolicyContext
impl Send for PolicyContext
impl Sync for PolicyContext
impl Unpin for PolicyContext
impl UnsafeUnpin for PolicyContext
impl UnwindSafe for PolicyContext
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