pub enum NodeExitStatus {
Success,
IoError(String),
ExitCode(i32),
Signal(i32),
Unknown,
}Expand description
How a node process ended.
Built from the node process’s ExitStatus (see
the From impl), so it distinguishes a clean exit, a non-zero exit code,
a killing signal (Unix), and the case where the daemon could not even wait
on the process (IoError).
Variants§
Success
The process exited successfully (exit code 0).
IoError(String)
The daemon failed to launch or wait on the process.
ExitCode(i32)
The process exited with this non-zero code.
Signal(i32)
The process was terminated by this signal (Unix only).
Unknown
The process ended in a way that is neither a code nor a signal.
Implementations§
Source§impl NodeExitStatus
impl NodeExitStatus
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Whether the node exited cleanly (i.e. this is Success).
use dora_message::common::NodeExitStatus;
assert!(NodeExitStatus::Success.is_success());
assert!(!NodeExitStatus::ExitCode(1).is_success());Trait Implementations§
Source§impl Clone for NodeExitStatus
impl Clone for NodeExitStatus
Source§impl Debug for NodeExitStatus
impl Debug for NodeExitStatus
Source§impl<'de> Deserialize<'de> for NodeExitStatus
impl<'de> Deserialize<'de> for NodeExitStatus
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Result<ExitStatus, Error>> for NodeExitStatus
impl From<Result<ExitStatus, Error>> for NodeExitStatus
Auto Trait Implementations§
impl Freeze for NodeExitStatus
impl RefUnwindSafe for NodeExitStatus
impl Send for NodeExitStatus
impl Sync for NodeExitStatus
impl Unpin for NodeExitStatus
impl UnsafeUnpin for NodeExitStatus
impl UnwindSafe for NodeExitStatus
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
Converts
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> ⓘ
Converts
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 more