pub enum CommandOutcome {
Exited(i32),
Signaled(i32),
NotFound(String),
NotExecutable(String),
StartFailed(String),
Failed(String),
}Expand description
How a command ended, or why it did not run.
Variants§
Exited(i32)
The command exited with this exit code: exited, with code.
Signaled(i32)
A signal with this number killed the command: signaled, with signal.
NotFound(String)
The program was not found: not_found, with error.
NotExecutable(String)
The program was found but cannot be run: not_executable, with error.
StartFailed(String)
The program could not be started for another reason: start_failed, with
error.
Failed(String)
Kizz or its tracer failed: failed, with error. The command’s trace is
then incomplete, with a tracer_failed reason.
Implementations§
Source§impl CommandOutcome
impl CommandOutcome
Sourcepub const fn from_termination(termination: Termination) -> Self
pub const fn from_termination(termination: Termination) -> Self
The outcome of a command that ended as termination says.
Sourcepub fn from_error(error: &TraceError) -> Self
pub fn from_error(error: &TraceError) -> Self
The outcome of a request that failed with error, whose message it keeps.
Sourcepub const fn kind(&self) -> &'static str
pub const fn kind(&self) -> &'static str
The outcome’s kind, as JSON names it, such as not_found.
Sourcepub fn text(&self) -> String
pub fn text(&self) -> String
The outcome as text shows it, such as exited with 0 or
not found: MESSAGE, with the message escaped as escape_text escapes
it.
Trait Implementations§
Source§impl Clone for CommandOutcome
impl Clone for CommandOutcome
Source§impl Debug for CommandOutcome
impl Debug for CommandOutcome
impl Eq for CommandOutcome
Source§impl Hash for CommandOutcome
impl Hash for CommandOutcome
Source§impl PartialEq for CommandOutcome
impl PartialEq for CommandOutcome
impl StructuralPartialEq for CommandOutcome
Auto Trait Implementations§
impl Freeze for CommandOutcome
impl RefUnwindSafe for CommandOutcome
impl Send for CommandOutcome
impl Sync for CommandOutcome
impl Unpin for CommandOutcome
impl UnsafeUnpin for CommandOutcome
impl UnwindSafe for CommandOutcome
Blanket Implementations§
impl<T> AsTypeStaticRegistered 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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
impl<T> HasTyVTable for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 more