Enum polar_core::error::ValidationError
source · [−]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: RuleInvalidRule
InvalidRuleType
UndefinedRuleCall
Fields
term: TermTerm
The policy contains a call to an undefined rule. This is the validation analogue of
RuntimeError::QueryForUndefinedRule.
ResourceBlock
SingletonVariable
Fields
term: TermTerm
UnregisteredClass
Fields
term: TermTerm
DuplicateResourceBlockDeclaration
Fields
resource: TermTerm
declaration: TermTerm
existing: Declarationnew: DeclarationTrait 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) -> Self
fn from(err: ValidationError) -> Self
Converts to this type from the input type.
sourceimpl Serialize for ValidationError
impl Serialize for ValidationError
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> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more