pub enum Error {
WordError(WordError),
GridError(GridError),
Custom(String),
}Expand description
Error represents general application errors, encompassing WordError and GridError,
as well as custom error messages.
Variants§
WordError(WordError)
Wraps a WordError that occurred within the application.
GridError(GridError)
Wraps a GridError that occurred within the application.
Custom(String)
Represents a custom error message, useful for general application-level failures.
Trait Implementations§
Source§impl Display for Error
Implements the Display trait for Error, allowing general application errors to be formatted as user-friendly strings.
impl Display for Error
Implements the Display trait for Error, allowing general application errors to be formatted as user-friendly strings.
Source§impl Error for Error
Implements the Error trait for Error, providing a common interface for general application error handling.
impl Error for Error
Implements the Error trait for Error, providing a common interface for general application error handling.
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 Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin 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