pub struct ExecResult {
pub exec_id: String,
pub phase: Phase,
pub outcome: Option<Outcome>,
}Expand description
An exec’s phase and, once it has one, its outcome.
A thin wrapper over the daemon’s protocol::exec::PollResponse rather than a
re-modelling of it, so the two cannot disagree. What it adds is ExecResult::done,
which is the question every caller actually asks.
Fields§
§exec_id: String§phase: Phase§outcome: Option<Outcome>None while running. Present once the child has exited.
Implementations§
Source§impl ExecResult
impl ExecResult
Sourcepub fn exit_code(&self) -> Option<i32>
pub fn exit_code(&self) -> Option<i32>
The exit code, when the child exited with one rather than dying to a signal.
Sourcepub fn succeeded(&self) -> bool
pub fn succeeded(&self) -> bool
Whether the command succeeded. false for a signal death and for a still-running
exec, since neither is a success.
pub fn stdout(&self) -> &str
pub fn stderr(&self) -> &str
Trait Implementations§
Source§impl Debug for ExecResult
impl Debug for ExecResult
Source§impl From<PollResponse> for ExecResult
impl From<PollResponse> for ExecResult
Source§fn from(response: PollResponse) -> Self
fn from(response: PollResponse) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ExecResult
impl RefUnwindSafe for ExecResult
impl Send for ExecResult
impl Sync for ExecResult
impl Unpin for ExecResult
impl UnsafeUnpin for ExecResult
impl UnwindSafe for ExecResult
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
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> ⓘ
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 moreCreates a shared type from an unshared type.