pub enum ExitCause {
Clean,
TaskPanicked,
Failed(ChainViewError),
}Expand description
Why the supervised process exited — the value Supervisor::run returns for
main to map to a process exit code and an optional post-restore stderr
line (docs/02-tui-architecture.md §12).
The supervisor never calls std::process::exit (that would bypass the
TerminalGuard’s Drop); it returns this instead.
Variants§
Clean
A clean shutdown (q/Ctrl-C, or every task ending on its own) — exit
code 0, no stderr line.
TaskPanicked
A supervised task panicked — fatal, non-zero exit.
Failed(ChainViewError)
A fatal error (startup failure, a provider failure past its reconnect budget, a channel close) — non-zero exit.
Implementations§
Source§impl ExitCause
impl ExitCause
Sourcepub fn exit_code(&self) -> i32
pub fn exit_code(&self) -> i32
The process exit code main should use: 0 for a clean quit, 1 for any
supervised failure.
Sourcepub fn failure_message(&self) -> Option<String>
pub fn failure_message(&self) -> Option<String>
The non-secret line main may print to stderr after the terminal is
restored, or None for a clean quit. The error Display is already
redaction-safe (docs/01-domain-model.md §11).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ExitCause
impl !UnwindSafe for ExitCause
impl Freeze for ExitCause
impl Send for ExitCause
impl Sync for ExitCause
impl Unpin for ExitCause
impl UnsafeUnpin for ExitCause
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.