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 issues found by validation and whether validation succeeds or fails. Validation succeeds if there are no fatal errors. There may still be non-fatal warnings present when validation passes.
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 errors, but there may be
non-fatal warnings. Use ValidationResult::validation_passed_without_warnings
to check that there are also no warnings.
sourcepub fn validation_passed_without_warnings(&self) -> bool
pub fn validation_passed_without_warnings(&self) -> bool
True when validation passes (i.e., there are no errors) and there are additionally no non-fatal warnings.
sourcepub fn validation_errors(&self) -> impl Iterator<Item = &ValidationError<'a>>
pub fn validation_errors(&self) -> impl Iterator<Item = &ValidationError<'a>>
Get an iterator over the errors found by the validator.
sourcepub fn validation_warnings(
&self
) -> impl Iterator<Item = &ValidationWarning<'a>>
pub fn validation_warnings( &self ) -> impl Iterator<Item = &ValidationWarning<'a>>
Get an iterator over the warnings 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> 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