pub enum ShutdownReason {
UserRequested,
RpcRequested,
ReloadRequested,
RequestedByRun,
Fatal(String),
}Expand description
Why the service is shutting down.
Binaries map these to process exit codes:
UserRequested/RequestedByRun/ReloadRequested→ 0.RpcRequested→ 0.Fatal(_)→ non-zero.
Variants§
UserRequested
SIGINT / SIGTERM / Ctrl-C.
RpcRequested
An admin RPC method (stop_node) requested shutdown.
ReloadRequested
A reload was requested; the binary should exit and re-spawn.
RequestedByRun
The node’s run method returned without any outside signal; the
service treats that as a graceful exit.
Fatal(String)
An unrecoverable internal error. The string is human-readable.
Trait Implementations§
Source§impl Clone for ShutdownReason
impl Clone for ShutdownReason
Source§fn clone(&self) -> ShutdownReason
fn clone(&self) -> ShutdownReason
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ShutdownReason
impl RefUnwindSafe for ShutdownReason
impl Send for ShutdownReason
impl Sync for ShutdownReason
impl Unpin for ShutdownReason
impl UnsafeUnpin for ShutdownReason
impl UnwindSafe for ShutdownReason
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