pub enum ValidationError {
FileLoading {
filename: String,
contents: String,
msg: String,
},
MissingRequiredRule {
rule_type: Rule,
},
InvalidRule {
rule: Rule,
msg: String,
},
InvalidRuleType {
rule_type: Rule,
msg: String,
},
UndefinedRuleCall {
term: Term,
},
ResourceBlock {
term: Term,
msg: String,
},
SingletonVariable {
term: Term,
},
UnregisteredClass {
term: Term,
},
DuplicateResourceBlockDeclaration {
resource: Term,
declaration: Term,
existing: Declaration,
new: Declaration,
},
}
Variants
FileLoading
MissingRequiredRule
Fields
rule_type: Rule
InvalidRule
InvalidRuleType
UndefinedRuleCall
Fields
term: Term
Term
The policy contains a call to an undefined rule. This is the validation analogue of
RuntimeError::QueryForUndefinedRule
.
ResourceBlock
SingletonVariable
Fields
term: Term
Term
UnregisteredClass
Fields
term: Term
Term
DuplicateResourceBlockDeclaration
Fields
resource: Term
Term
declaration: Term
Term
existing: Declaration
new: Declaration
Trait Implementations
sourceimpl AsRef<str> for ValidationError
impl AsRef<str> for ValidationError
sourceimpl Clone for ValidationError
impl Clone for ValidationError
sourcefn clone(&self) -> ValidationError
fn clone(&self) -> ValidationError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ValidationError
impl Debug for ValidationError
sourceimpl Display for ValidationError
impl Display for ValidationError
sourceimpl From<ValidationError> for PolarError
impl From<ValidationError> for PolarError
sourcefn from(err: ValidationError) -> PolarError
fn from(err: ValidationError) -> PolarError
Converts to this type from the input type.
sourceimpl Serialize for ValidationError
impl Serialize for ValidationError
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for ValidationError
impl Send for ValidationError
impl Sync for ValidationError
impl Unpin for ValidationError
impl UnwindSafe for ValidationError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more