pub struct Context<'a> {
pub grants: &'a dyn GrantSource,
pub tuples: Option<&'a dyn TupleStore>,
pub env: &'a Attributes,
}Expand description
Data of a decision: grants, ReBAC tuples and environment attributes. The Engine only holds
configuration; the data arrives with each call.
Fields§
§grants: &'a dyn GrantSource§tuples: Option<&'a dyn TupleStore>§env: &'a AttributesImplementations§
Source§impl<'a> Context<'a>
impl<'a> Context<'a>
pub fn new(grants: &'a dyn GrantSource) -> Self
pub fn with_tuples(self, tuples: &'a dyn TupleStore) -> Self
pub fn with_env(self, env: &'a Attributes) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Context<'a>
impl<'a> !Send for Context<'a>
impl<'a> !Sync for Context<'a>
impl<'a> !UnwindSafe for Context<'a>
impl<'a> Forget for Context<'a>
impl<'a> Freeze for Context<'a>
impl<'a> Move for Context<'a>
impl<'a> Unpin for Context<'a>
impl<'a> UnsafeUnpin for Context<'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