pub struct ExecResult { /* private fields */ }
Expand description
Gets the result of the exec spec
Implementations§
Source§impl ExecResult
impl ExecResult
Sourcepub fn code(&self) -> ExitStatus
pub fn code(&self) -> ExitStatus
Gets the exit code for the exec spec
Sourcepub fn expect_success(self) -> BuildResult<Self>
pub fn expect_success(self) -> BuildResult<Self>
Make this an error if exit code is not success
Sourcepub fn bytes(&self) -> Option<&[u8]>
pub fn bytes(&self) -> Option<&[u8]>
Gets the output, in bytes, if the original exec spec specified the bytes output type
Sourcepub fn utf8_string(&self) -> Option<Result<String, FromUtf8Error>>
pub fn utf8_string(&self) -> Option<Result<String, FromUtf8Error>>
Try to convert the output bytes into a string
Sourcepub fn bytes_err(&self) -> Option<&[u8]>
pub fn bytes_err(&self) -> Option<&[u8]>
Gets the output, in bytes, if the original exec spec specified the bytes output type
Sourcepub fn utf8_string_err(&self) -> Option<Result<String, FromUtf8Error>>
pub fn utf8_string_err(&self) -> Option<Result<String, FromUtf8Error>>
Try to convert the output bytes into a string
Auto Trait Implementations§
impl Freeze for ExecResult
impl RefUnwindSafe for ExecResult
impl Send for ExecResult
impl Sync for ExecResult
impl Unpin 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> InstanceOf for T
impl<T> InstanceOf for T
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 more