#[non_exhaustive]pub enum SchedulerError {
InvalidCron(String),
Database(SqlxError),
Db(DbError),
TaskFailed(String),
DuplicateJob(String),
Detach(String),
Io(String),
PromptInjectionBlocked {
task_name: String,
reason: String,
},
TaskQuarantined {
task_name: String,
},
}Expand description
Errors that can occur inside the scheduler subsystem.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidCron(String)
The provided cron expression could not be parsed.
The inner string contains the original expression and the parser’s error message.
Database(SqlxError)
A low-level SQLx error occurred during a database operation.
Db(DbError)
A high-level zeph-db error occurred (e.g. during migrations or connection setup).
TaskFailed(String)
The crate::TaskHandler returned an error during task execution.
The inner string is the human-readable description from the handler.
DuplicateJob(String)
A job with the given name already exists in the store.
Returned by crate::JobStore::insert_job on a UNIQUE constraint violation.
Detach(String)
Failed to detach the daemon process (fork, exec, or I/O redirection error).
Io(String)
A generic I/O error from daemon lifecycle operations (pid file, log file).
PromptInjectionBlocked
A task prompt matched an injection pattern and was blocked by the RTW-A defense.
The task is skipped for this tick and logged at WARN level. No prompt is
forwarded to the agent loop.
Fields
TaskQuarantined
A task was quarantined by the RTW-A write-fence and skipped for this tick.
Tasks written to the store in the same tick they would execute are held back for one tick to prevent write-before-exposed-read re-entry attacks.
Trait Implementations§
Source§impl Debug for SchedulerError
impl Debug for SchedulerError
Source§impl Display for SchedulerError
impl Display for SchedulerError
Source§impl Error for SchedulerError
impl Error for SchedulerError
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 From<DbError> for SchedulerError
impl From<DbError> for SchedulerError
Auto Trait Implementations§
impl !RefUnwindSafe for SchedulerError
impl !UnwindSafe for SchedulerError
impl Freeze for SchedulerError
impl Send for SchedulerError
impl Sync for SchedulerError
impl Unpin for SchedulerError
impl UnsafeUnpin for SchedulerError
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> 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 more