pub struct Context<'a> { /* private fields */ }Expand description
Everything a check needs besides the ACL and the rights wanted: the schema, who asks, the item’s owner, the consumer’s conditions and the options.
Implementations§
Source§impl<'a> Context<'a>
impl<'a> Context<'a>
Sourcepub fn new(schema: &'a RightsSchema) -> Self
pub fn new(schema: &'a RightsSchema) -> Self
A check by nobody signed in, of an item with no owner, with default options.
Sourcepub fn owner(self, owner: Option<&'a Subject>) -> Self
pub fn owner(self, owner: Option<&'a Subject>) -> Self
The item’s owner. ItemAcl::check sets it from the item.
Sourcepub fn owner_group(self, group: Option<&'a Subject>) -> Self
pub fn owner_group(self, group: Option<&'a Subject>) -> Self
The item’s owning group. ItemAcl::check sets it from the item.
Sourcepub fn owner_rights(self, rights: Rights) -> Self
pub fn owner_rights(self, rights: Rights) -> Self
Rights the owner holds whatever the entries say, unless an entry names Owner
(Windows grants READ_CONTROL and WRITE_DAC, dropped by an OWNER RIGHTS entry).
Default none.
Sourcepub fn conditions(self, conditions: &'a dyn Conditions) -> Self
pub fn conditions(self, conditions: &'a dyn Conditions) -> Self
The consumer’s conditions; without them every condition is unknown.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Context<'a>
impl<'a> !UnwindSafe for Context<'a>
impl<'a> Freeze for Context<'a>
impl<'a> Send for Context<'a>
impl<'a> Sync 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