pub enum CelersError {
Serialization(String),
Deserialization(String),
Broker(String),
TaskNotFound(String),
TaskExecution(String),
TaskRevoked(TaskId),
Timeout(String),
InvalidStateTransition {
from: String,
to: String,
},
Configuration(String),
Io(Error),
Other(String),
}Variants§
Serialization(String)
Deserialization(String)
Broker(String)
TaskNotFound(String)
TaskExecution(String)
TaskRevoked(TaskId)
Timeout(String)
InvalidStateTransition
Configuration(String)
Io(Error)
Other(String)
Implementations§
Source§impl CelersError
impl CelersError
Sourcepub const fn is_serialization(&self) -> bool
pub const fn is_serialization(&self) -> bool
Check if the error is serialization-related
Sourcepub const fn is_deserialization(&self) -> bool
pub const fn is_deserialization(&self) -> bool
Check if the error is deserialization-related
Sourcepub const fn is_task_not_found(&self) -> bool
pub const fn is_task_not_found(&self) -> bool
Check if the error is task-not-found
Sourcepub const fn is_task_execution(&self) -> bool
pub const fn is_task_execution(&self) -> bool
Check if the error is task-execution-related
Sourcepub const fn is_task_revoked(&self) -> bool
pub const fn is_task_revoked(&self) -> bool
Check if the error is task-revoked
Sourcepub const fn is_timeout(&self) -> bool
pub const fn is_timeout(&self) -> bool
Check if the error is timeout-related
Sourcepub const fn is_configuration(&self) -> bool
pub const fn is_configuration(&self) -> bool
Check if the error is configuration-related
Sourcepub const fn is_invalid_state_transition(&self) -> bool
pub const fn is_invalid_state_transition(&self) -> bool
Check if the error is an invalid state transition
Sourcepub const fn is_retryable(&self) -> bool
pub const fn is_retryable(&self) -> bool
Check if this is a retryable error
Returns true for broker errors and IO errors, which are typically transient. Returns false for serialization, configuration, and state transition errors.
Trait Implementations§
Source§impl Debug for CelersError
impl Debug for CelersError
Source§impl Display for CelersError
impl Display for CelersError
Source§impl Error for CelersError
impl Error for CelersError
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 CelersError
impl !RefUnwindSafe for CelersError
impl Send for CelersError
impl Sync for CelersError
impl Unpin for CelersError
impl !UnwindSafe for CelersError
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