#[non_exhaustive]pub enum HexeractError {
HandlerNotFound {
command_type: &'static str,
},
HandlerFailed {
source: Box<dyn Error + Send + Sync>,
},
Timeout {
elapsed: Duration,
},
Dispatch(String),
}Expand description
Top-level error type for the Hexeract framework.
This enum is marked #[non_exhaustive] so that new variants can be added
in minor versions without breaking downstream match arms.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
HandlerNotFound
No handler was registered for the given command or query type.
Fields
HandlerFailed
A handler returned an error. The original error is preserved as source.
Timeout
A dispatch exceeded its configured deadline.
Dispatch(String)
A generic dispatch-level error with a human-readable message.
Implementations§
Source§impl HexeractError
impl HexeractError
Sourcepub fn handler_failed(source: impl Error + Send + Sync + 'static) -> Self
pub fn handler_failed(source: impl Error + Send + Sync + 'static) -> Self
Wraps any Send + Sync error as a HexeractError::HandlerFailed.
Trait Implementations§
Source§impl Debug for HexeractError
impl Debug for HexeractError
Source§impl Display for HexeractError
impl Display for HexeractError
Source§impl Error for HexeractError
impl Error for HexeractError
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 HexeractError
impl !RefUnwindSafe for HexeractError
impl Send for HexeractError
impl Sync for HexeractError
impl Unpin for HexeractError
impl UnsafeUnpin for HexeractError
impl !UnwindSafe for HexeractError
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