Struct cedar_policy::EvaluationResponse
source · pub struct EvaluationResponse { /* private fields */ }
Available on crate feature
partial-eval
only.Expand description
A policy evaluation response obtained from evaluate_policies_partial
.
This feature is experimental. For more information see https://github.com/cedar-policy/rfcs/blob/main/README.md#experimental-features
Implementations§
source§impl EvaluationResponse
impl EvaluationResponse
sourcepub fn new(
satisfied_permits: HashSet<PolicyId>,
satisfied_forbids: HashSet<PolicyId>,
errors: Vec<AuthorizationError>,
permit_residuals: PolicySet,
forbid_residuals: PolicySet
) -> Self
pub fn new( satisfied_permits: HashSet<PolicyId>, satisfied_forbids: HashSet<PolicyId>, errors: Vec<AuthorizationError>, permit_residuals: PolicySet, forbid_residuals: PolicySet ) -> Self
Create a new EvaluationResponse
.
sourcepub fn satisfied_permits(&self) -> impl Iterator<Item = &PolicyId>
pub fn satisfied_permits(&self) -> impl Iterator<Item = &PolicyId>
Get the PolicyId
s of fully evaluated policies with a permit Effect
.
sourcepub fn satisfied_forbids(&self) -> impl Iterator<Item = &PolicyId>
pub fn satisfied_forbids(&self) -> impl Iterator<Item = &PolicyId>
Get the PolicyId
s of fully evaluated policies with a forbid Effect
.
sourcepub fn permit_residuals(&self) -> &PolicySet
pub fn permit_residuals(&self) -> &PolicySet
Get the redisual policies with a permit Effect
.
sourcepub fn forbid_residuals(&self) -> &PolicySet
pub fn forbid_residuals(&self) -> &PolicySet
Get the redisual policies with a permit Effect
.
sourcepub fn errors(&self) -> impl Iterator<Item = &AuthorizationError>
pub fn errors(&self) -> impl Iterator<Item = &AuthorizationError>
Get the evaluation errors.
Trait Implementations§
source§impl Clone for EvaluationResponse
impl Clone for EvaluationResponse
source§fn clone(&self) -> EvaluationResponse
fn clone(&self) -> EvaluationResponse
Returns a copy 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 moresource§impl Debug for EvaluationResponse
impl Debug for EvaluationResponse
source§impl PartialEq for EvaluationResponse
impl PartialEq for EvaluationResponse
source§fn eq(&self, other: &EvaluationResponse) -> bool
fn eq(&self, other: &EvaluationResponse) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for EvaluationResponse
impl StructuralPartialEq for EvaluationResponse
Auto Trait Implementations§
impl Freeze for EvaluationResponse
impl RefUnwindSafe for EvaluationResponse
impl Send for EvaluationResponse
impl Sync for EvaluationResponse
impl Unpin for EvaluationResponse
impl UnwindSafe for EvaluationResponse
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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 more