pub struct PolicyEvaluator<'a> { /* private fields */ }Implementations§
Source§impl<'a> PolicyEvaluator<'a>
impl<'a> PolicyEvaluator<'a>
pub fn new(services: &'a Arc<Services>, symbols: &'a SymbolTable) -> Self
pub fn enforce_write_policies( &self, tx: &mut Transaction<'_>, target_namespace: &str, target_object: &str, operation: DataOp, row_columns: &Columns, target_type: PolicyTargetType, ) -> Result<()>
pub fn enforce_session_policy( &self, tx: &mut Transaction<'_>, session_type: SessionOp, default_deny: bool, ) -> Result<()>
pub fn enforce_identity_policy( &self, tx: &mut Transaction<'_>, target_namespace: &str, target_object: &str, operation: CallableOp, target_type: PolicyTargetType, ) -> Result<()>
Trait Implementations§
Source§impl PolicyEvaluator for PolicyEvaluator<'_>
impl PolicyEvaluator for PolicyEvaluator<'_>
fn evaluate_condition( &self, expr: &Expression, columns: &Columns, row_count: usize, identity: IdentityId, ) -> Result<bool>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for PolicyEvaluator<'a>
impl<'a> !UnwindSafe for PolicyEvaluator<'a>
impl<'a> Freeze for PolicyEvaluator<'a>
impl<'a> Send for PolicyEvaluator<'a>
impl<'a> Sync for PolicyEvaluator<'a>
impl<'a> Unpin for PolicyEvaluator<'a>
impl<'a> UnsafeUnpin for PolicyEvaluator<'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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request