#[non_exhaustive]pub enum PlannerError {
EmptyValue {
field: &'static str,
},
BenefitOutOfRange(u16),
RiskOutOfRange(u16),
ZeroCost,
SelfDependency {
action_id: String,
},
UnknownPrerequisite {
action_id: String,
prerequisite: String,
},
DependencyCycle {
action_id: String,
},
ActionIdentityConflict {
id: String,
},
IncompleteDecision {
action_id: String,
},
Rule(RuleEngineError),
}Expand description
Validation and consistency failures raised by the attack planner.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
EmptyValue
A required identifier or executor name was empty.
BenefitOutOfRange(u16)
A normalized benefit exceeded 10,000 basis points.
RiskOutOfRange(u16)
Risk must be in the inclusive 1..=10_000 range.
ZeroCost
Estimated action cost must be positive.
SelfDependency
An action listed itself as a prerequisite.
UnknownPrerequisite
An action referenced a prerequisite that is not registered.
Fields
DependencyCycle
The action dependency graph contains a cycle.
ActionIdentityConflict
An action identity was reused with different semantics.
IncompleteDecision
Internal selection accounting omitted a registered action.
Rule(RuleEngineError)
Expression evaluation failed.
Trait Implementations§
Source§impl Debug for PlannerError
impl Debug for PlannerError
Source§impl Display for PlannerError
impl Display for PlannerError
Source§impl Error for PlannerError
impl Error for PlannerError
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 From<PlannerError> for StandardWebPlanningError
impl From<PlannerError> for StandardWebPlanningError
Source§fn from(source: PlannerError) -> Self
fn from(source: PlannerError) -> Self
Converts to this type from the input type.
Source§impl From<PlannerError> for DecisionLoopError
impl From<PlannerError> for DecisionLoopError
Source§fn from(source: PlannerError) -> Self
fn from(source: PlannerError) -> Self
Converts to this type from the input type.
Source§impl From<PlannerError> for StandardWebDecisionRuntimeError
impl From<PlannerError> for StandardWebDecisionRuntimeError
Source§fn from(source: PlannerError) -> Self
fn from(source: PlannerError) -> Self
Converts to this type from the input type.
Source§impl From<RuleEngineError> for PlannerError
impl From<RuleEngineError> for PlannerError
Source§fn from(source: RuleEngineError) -> Self
fn from(source: RuleEngineError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PlannerError
impl RefUnwindSafe for PlannerError
impl Send for PlannerError
impl Sync for PlannerError
impl Unpin for PlannerError
impl UnsafeUnpin for PlannerError
impl UnwindSafe for PlannerError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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