pub enum ShellError<'a> {
CodeAlreadyExists {
name: &'a str,
},
CodeDoesNotExist {
name: &'a str,
},
CodeError {
err: CodeError<'a>,
},
}
Variants§
CodeAlreadyExists
This error is returned when a code already exists in the database. This usually happens when you register a code again.
CodeDoesNotExist
This error is returned when a code does not exist in the database. This usually happens when you try to unregister a code that does not exist.
CodeError
This error is returned when an error occurs in Code.
Trait Implementations§
Source§impl<'a> Debug for ShellError<'a>
impl<'a> Debug for ShellError<'a>
Source§impl<'a> Display for ShellError<'a>
impl<'a> Display for ShellError<'a>
Source§impl<'a> Error for ShellError<'a>
impl<'a> Error for ShellError<'a>
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§impl<'a> ErrorCompat for ShellError<'a>
impl<'a> ErrorCompat for ShellError<'a>
Auto Trait Implementations§
impl<'a> Freeze for ShellError<'a>
impl<'a> RefUnwindSafe for ShellError<'a>
impl<'a> Send for ShellError<'a>
impl<'a> Sync for ShellError<'a>
impl<'a> Unpin for ShellError<'a>
impl<'a> UnwindSafe for ShellError<'a>
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
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