pub enum Error {
Config(String),
ConfigParse {
path: PathBuf,
source: Box<Error>,
},
ConfigRead {
path: PathBuf,
source: Error,
},
CronParse {
expr: String,
reason: String,
},
JobNotFound {
job_name: String,
},
JobFailed {
job_name: String,
exit_code: i32,
},
JobTimeout {
job_name: String,
timeout_secs: u64,
},
JobSpawn {
job_name: String,
source: Error,
},
Scheduler(String),
Io(Error),
ChannelSend,
Shutdown,
}Expand description
Main error type for FlashCron
Variants§
Config(String)
ConfigParse
ConfigRead
CronParse
JobNotFound
JobFailed
JobTimeout
JobSpawn
Scheduler(String)
Io(Error)
ChannelSend
Shutdown
Implementations§
Source§impl Error
impl Error
Sourcepub fn cron_parse(expr: impl Into<String>, reason: impl Into<String>) -> Self
pub fn cron_parse(expr: impl Into<String>, reason: impl Into<String>) -> Self
Create a cron parse error
Sourcepub fn job_not_found(name: impl Into<String>) -> Self
pub fn job_not_found(name: impl Into<String>) -> Self
Create a job not found error
Sourcepub fn job_failed(name: impl Into<String>, exit_code: i32) -> Self
pub fn job_failed(name: impl Into<String>, exit_code: i32) -> Self
Create a job failed error
Sourcepub fn job_timeout(name: impl Into<String>, timeout_secs: u64) -> Self
pub fn job_timeout(name: impl Into<String>, timeout_secs: u64) -> Self
Create a job timeout error
Sourcepub fn is_shutdown(&self) -> bool
pub fn is_shutdown(&self) -> bool
Check if this is a shutdown error
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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
Mutably borrows from an owned value. Read more