pub enum Error<E> {
AliasNotSingleWord(String),
CallerAlreadyExists(String),
CallerNotFound(String),
CommandFailed(Text),
Empty,
NoFileYet,
NoFileForRelated,
NoWidgetYet,
WidgetIsNot,
InputIsNot(PhantomData<E>),
}Expand description
Error for failures in Duat
Variants§
AliasNotSingleWord(String)
§Command related errors:
An alias wasn’t just a single word
CallerAlreadyExists(String)
The caller for a command already pertains to another
CallerNotFound(String)
No commands have the given caller as one of their own
CommandFailed(Text)
The command failed internally
Empty
There was no caller and no arguments
NoFileYet
§Context related errors:
The [Ui] still hasn’t created the first file
NoFileForRelated
Since the [Ui] has no file, widgets can’t relate to it
NoWidgetYet
The [Ui] still hasn’t created the first widget (a file)
WidgetIsNot
The checked widget is not of the type given
InputIsNot(PhantomData<E>)
The checked input is not of the type given
Implementations§
Trait Implementations§
source§impl<E> Error for Error<E>
impl<E> Error for Error<E>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<E> Freeze for Error<E>
impl<E> !RefUnwindSafe for Error<E>
impl<E> Send for Error<E>where
E: Send,
impl<E> Sync for Error<E>where
E: Sync,
impl<E> Unpin for Error<E>where
E: Unpin,
impl<E> !UnwindSafe for Error<E>
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