pub enum Error {
Boot {
name: &'static str,
source: BoxError,
},
Validate {
name: &'static str,
source: BoxError,
},
Reload {
name: &'static str,
source: BoxError,
},
Run {
name: &'static str,
source: BoxError,
},
Recoverable {
name: &'static str,
source: BoxError,
},
Other(BoxError),
}Variants§
Boot
Validate
Reload
Run
Fatal runnable failure (default). The runtime tears the worker down so the supervisor can respawn cleanly.
Recoverable
Recoverable runnable failure. The runtime logs and keeps the worker serving — used for best-effort tasks (e.g. notify listeners, optional integrations) where a transient or configuration-driven failure shouldn’t kill traffic.
Other(BoxError)
Implementations§
Source§impl Error
Construct Error::Other from an arbitrary message string.
impl Error
Construct Error::Other from an arbitrary message string.
pub fn msg(s: impl Into<String>) -> Self
Sourcepub fn recoverable(s: impl Into<String>) -> Self
pub fn recoverable(s: impl Into<String>) -> Self
Build a recoverable runnable error from an arbitrary message.
The runtime logs this and lets the worker keep serving instead of
tearing it down. The provider name is filled in by run_all’s
wrapper, so callers only supply the message.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin 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