Struct cedar_policy_validator::ValidationError
source · pub struct ValidationError<'a> { /* private fields */ }
Expand description
An error generated by the validator when it finds a potential problem in a policy. The error contains a enumeration that specifies the kind of problem, and provides details specific to that kind of problem. The error also records where the problem was encountered.
Implementations§
source§impl<'a> ValidationError<'a>
impl<'a> ValidationError<'a>
sourcepub fn into_location_and_error_kind(
self,
) -> (SourceLocation<'a>, ValidationErrorKind)
pub fn into_location_and_error_kind( self, ) -> (SourceLocation<'a>, ValidationErrorKind)
Deconstruct this into its component source location and error kind.
sourcepub fn error_kind(&self) -> &ValidationErrorKind
pub fn error_kind(&self) -> &ValidationErrorKind
Extract details about the exact issue detected by the validator.
sourcepub fn location(&self) -> &SourceLocation<'_>
pub fn location(&self) -> &SourceLocation<'_>
Extract the location where the validator found the issue.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ValidationError<'a>
impl<'a> RefUnwindSafe for ValidationError<'a>
impl<'a> Send for ValidationError<'a>
impl<'a> Sync for ValidationError<'a>
impl<'a> Unpin for ValidationError<'a>
impl<'a> UnwindSafe for ValidationError<'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