pub enum ScheduleError {
Lex {
message: String,
span: Span,
input: String,
},
Parse {
message: String,
span: Span,
input: String,
suggestion: Option<String>,
},
Eval {
message: String,
},
Cron {
message: String,
},
}Expand description
All errors produced by hron.
Variants§
Implementations§
Source§impl ScheduleError
impl ScheduleError
pub fn lex( message: impl Into<String>, span: Span, input: impl Into<String>, ) -> Self
pub fn parse( message: impl Into<String>, span: Span, input: impl Into<String>, suggestion: Option<String>, ) -> Self
pub fn eval(message: impl Into<String>) -> Self
pub fn cron(message: impl Into<String>) -> Self
Sourcepub fn display_rich(&self) -> String
pub fn display_rich(&self) -> String
Format a rich error with underline and optional suggestion.
Trait Implementations§
Source§impl Clone for ScheduleError
impl Clone for ScheduleError
Source§fn clone(&self) -> ScheduleError
fn clone(&self) -> ScheduleError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScheduleError
impl Debug for ScheduleError
Source§impl Display for ScheduleError
impl Display for ScheduleError
Source§impl Error for ScheduleError
impl Error for ScheduleError
1.30.0 · 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 ScheduleError
impl RefUnwindSafe for ScheduleError
impl Send for ScheduleError
impl Sync for ScheduleError
impl Unpin for ScheduleError
impl UnsafeUnpin for ScheduleError
impl UnwindSafe for ScheduleError
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