pub enum SporkError {
Start(AppStartError),
Stop(AppStopError),
Compile(AppCompileError),
Spawn(AppSpawnError),
Call(CallError),
Cast(CastError),
Info(InfoError),
}Expand description
Unified error type for all SPORK operations.
Variants§
Start(AppStartError)
Application start failed (compile or spawn phase).
Stop(AppStopError)
Application stop failed.
Compile(AppCompileError)
Supervisor topology compilation failed.
Spawn(AppSpawnError)
Supervisor spawn failed.
Call(CallError)
GenServer call() failed.
Cast(CastError)
GenServer cast() failed.
Info(InfoError)
GenServer info() send failed.
Implementations§
Source§impl SporkError
impl SporkError
Sourcepub fn severity(&self) -> SporkSeverity
pub fn severity(&self) -> SporkSeverity
Classify the severity of this error.
Severity is monotone: permanent errors remain permanent.
Sourcepub fn is_permanent(&self) -> bool
pub fn is_permanent(&self) -> bool
Returns true if this error is permanent (should not retry).
Sourcepub fn is_transient(&self) -> bool
pub fn is_transient(&self) -> bool
Returns true if this error is transient (may succeed on retry).
Trait Implementations§
Source§impl Debug for SporkError
impl Debug for SporkError
Source§impl Display for SporkError
impl Display for SporkError
Source§impl Error for SporkError
impl Error for SporkError
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()
Source§impl From<AppCompileError> for SporkError
impl From<AppCompileError> for SporkError
Source§fn from(e: AppCompileError) -> Self
fn from(e: AppCompileError) -> Self
Converts to this type from the input type.
Source§impl From<AppSpawnError> for SporkError
impl From<AppSpawnError> for SporkError
Source§fn from(e: AppSpawnError) -> Self
fn from(e: AppSpawnError) -> Self
Converts to this type from the input type.
Source§impl From<AppStartError> for SporkError
impl From<AppStartError> for SporkError
Source§fn from(e: AppStartError) -> Self
fn from(e: AppStartError) -> Self
Converts to this type from the input type.
Source§impl From<AppStopError> for SporkError
impl From<AppStopError> for SporkError
Source§fn from(e: AppStopError) -> Self
fn from(e: AppStopError) -> Self
Converts to this type from the input type.
Source§impl From<CallError> for SporkError
impl From<CallError> for SporkError
Source§impl From<CastError> for SporkError
impl From<CastError> for SporkError
Source§impl From<InfoError> for SporkError
impl From<InfoError> for SporkError
Source§impl From<SupervisorCompileError> for SporkError
impl From<SupervisorCompileError> for SporkError
Source§fn from(e: SupervisorCompileError) -> Self
fn from(e: SupervisorCompileError) -> Self
Converts to this type from the input type.
Source§impl From<SupervisorSpawnError> for SporkError
impl From<SupervisorSpawnError> for SporkError
Source§fn from(e: SupervisorSpawnError) -> Self
fn from(e: SupervisorSpawnError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SporkError
impl RefUnwindSafe for SporkError
impl Send for SporkError
impl Sync for SporkError
impl Unpin for SporkError
impl UnsafeUnpin for SporkError
impl UnwindSafe for SporkError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).