#[non_exhaustive]pub enum ExecutionError {
ValidationFailed(String),
CriticalRiskNotAllowed,
DeveloperOnlyForbidden,
SchemaMismatch(String),
FileConflict {
path: String,
reason: String,
},
UnsupportedPrimitive {
op: &'static str,
reason: &'static str,
},
DestructiveWithoutConfirmation {
op: &'static str,
},
ProjectStructure(String),
IoError {
path: String,
message: String,
},
PolicyViolation {
reason: String,
},
}Expand description
Every way the executor can refuse. All variants are refusal-first: nothing has been written when one of these is returned.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ValidationFailed(String)
Re-validation against the current schema failed. Carries the human-readable reason so the caller can print it verbatim.
CriticalRiskNotAllowed
The document’s risk classifier reached Critical. Executing a
plan at that level requires a reviewer to regenerate the plan
under a changed posture — the executor will not do it.
DeveloperOnlyForbidden
The plan contains a developer-only primitive (e.g.
CreateMigration). These must never flow through the AI path.
SchemaMismatch(String)
The plan was valid at save time but the current schema has drifted. The message names the step and the primitive error.
FileConflict
The executor was about to write a file that no longer matches the content recorded during the dry-run (or that exists when it shouldn’t). Never silently overwrite.
UnsupportedPrimitive
The primitive is valid in principle but not wired up in 0.5.2.
DestructiveWithoutConfirmation
A destructive primitive was requested without allow_destructive.
Reserved for 0.5.3+; 0.5.2 refuses destructive ops regardless.
ProjectStructure(String)
Expected project scaffolding isn’t present (apps/<x>/models.rs
missing for a model, migrations/ directory missing, …).
IoError
Filesystem error during read or write. Carries the OS message plus the offending path.
PolicyViolation
The plan violates a policy derived from the project’s
ContextConfig — for example, a remove_field targeting a
field flagged as personally-identifying under GDPR, or a
change_field_type on a regulated column. Refused up-front;
the operator can edit the context file or the plan and re-run.
Trait Implementations§
Source§impl Clone for ExecutionError
impl Clone for ExecutionError
Source§fn clone(&self) -> ExecutionError
fn clone(&self) -> ExecutionError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExecutionError
impl Debug for ExecutionError
Source§impl Display for ExecutionError
impl Display for ExecutionError
Source§impl Error for ExecutionError
impl Error for ExecutionError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for ExecutionError
impl PartialEq for ExecutionError
Source§fn eq(&self, other: &ExecutionError) -> bool
fn eq(&self, other: &ExecutionError) -> bool
self and other values to be equal, and is used by ==.impl Eq for ExecutionError
impl StructuralPartialEq for ExecutionError
Auto Trait Implementations§
impl Freeze for ExecutionError
impl RefUnwindSafe for ExecutionError
impl Send for ExecutionError
impl Sync for ExecutionError
impl Unpin for ExecutionError
impl UnsafeUnpin for ExecutionError
impl UnwindSafe for ExecutionError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.