Struct cedar_policy::ValidationResult
source · pub struct ValidationResult<'a> { /* private fields */ }
Expand description
Contains the result of policy validation. The result includes the list of of issues found by the validation and whether validation succeeds or fails. Validation succeeds if there are no fatal errors. There are currently no non-fatal warnings, so any issues found will cause validation to fail.
Implementations§
source§impl<'a> ValidationResult<'a>
impl<'a> ValidationResult<'a>
sourcepub fn validation_passed(&self) -> bool
pub fn validation_passed(&self) -> bool
True when validation passes. There are no fatal errors.
sourcepub fn validation_errors(&self) -> impl Iterator<Item = &ValidationError<'a>>
pub fn validation_errors(&self) -> impl Iterator<Item = &ValidationError<'a>>
Get the list of errors found by the validator.
Trait Implementations§
source§impl<'a> Debug for ValidationResult<'a>
impl<'a> Debug for ValidationResult<'a>
source§impl<'a> From<ValidationResult<'a>> for ValidationResult<'a>
impl<'a> From<ValidationResult<'a>> for ValidationResult<'a>
source§fn from(r: ValidationResult<'a>) -> Self
fn from(r: ValidationResult<'a>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for ValidationResult<'a>
impl<'a> RefUnwindSafe for ValidationResult<'a>
impl<'a> Send for ValidationResult<'a>
impl<'a> Sync for ValidationResult<'a>
impl<'a> Unpin for ValidationResult<'a>
impl<'a> UnwindSafe for ValidationResult<'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> 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