Struct cedar_policy::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 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<'a>
pub fn location(&self) -> &SourceLocation<'a>
Extract the location where the validator found the issue.
Trait Implementations§
source§impl<'a> Debug for ValidationError<'a>
impl<'a> Debug for ValidationError<'a>
source§impl<'a> Display for ValidationError<'a>
impl<'a> Display for ValidationError<'a>
source§impl<'a> Error for ValidationError<'a>
impl<'a> Error for ValidationError<'a>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl<'a> From<ValidationError<'a>> for ValidationError<'a>
impl<'a> From<ValidationError<'a>> for ValidationError<'a>
source§fn from(err: ValidationError<'a>) -> Self
fn from(err: ValidationError<'a>) -> Self
Converts to this type from the input type.
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