pub enum ExitReason {
Normal,
Crashed(String),
Runaway(String),
Killed(String),
Fatal(String),
}Expand description
Why a process stopped.
Variants§
Normal
Ran to completion.
Crashed(String)
A typed runtime failure. Carries the rendered error.
Runaway(String)
The execution budget ran out — a runaway. This is the case that was previously an OS-process abort, and it is the reason supervision is possible at all.
Killed(String)
Ended from outside: an exit signal from a linked process, exit(pid, reason), or a supervisor shutting its children down. Carries the
rendered reason.
Fatal(String)
A fault the runtime declares unrecoverable, such as a capability breach. Links and monitors see it; a supervisor never restarts it.
Implementations§
Source§impl ExitReason
impl ExitReason
Sourcepub fn memory_exhausted(bound: u64) -> Self
pub fn memory_exhausted(bound: u64) -> Self
A process that held more than bound live bytes: a runaway, which its
links, monitors and supervisor see, and a supervisor restarts.
pub fn dispatch_exhausted(limit: usize) -> Self
pub fn is_abnormal(&self) -> bool
pub fn is_fatal(&self) -> bool
Sourcepub fn is_restartable(&self) -> bool
pub fn is_restartable(&self) -> bool
Does a supervisor restart a child that exited this way?
Trait Implementations§
Source§impl Clone for ExitReason
impl Clone for ExitReason
Source§impl Debug for ExitReason
impl Debug for ExitReason
Source§impl PartialEq for ExitReason
impl PartialEq for ExitReason
impl StructuralPartialEq for ExitReason
Auto Trait Implementations§
impl Freeze for ExitReason
impl RefUnwindSafe for ExitReason
impl Send for ExitReason
impl Sync for ExitReason
impl Unpin for ExitReason
impl UnsafeUnpin for ExitReason
impl UnwindSafe for ExitReason
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