pub struct GitOutput {
pub code: Option<i32>,
pub stdout: Vec<u8>,
pub stderr: Vec<u8>,
}Expand description
What: How one Git start ended and what it wrote. Why: Callers decide on the exit code and parse standard output as bytes.
In TS you’d write (pseudocode):
type GitOutput = { stdout: Uint8Array; stderr: string; exitCode: number };Fields§
§code: Option<i32>Exit code;
None when a signal ended Git.
stdout: Vec<u8>Standard output bytes.
stderr: Vec<u8>Standard error bytes.
Implementations§
Source§impl GitOutput
Methods over a finished Git start.
impl GitOutput
Methods over a finished Git start.
Sourcepub fn succeeded(&self) -> bool
pub fn succeeded(&self) -> bool
What: Whether Git exited with status 0. Why: Most callers only need success or failure.
In TS you’d write (pseudocode):
output.exitCode === 0Sourcepub fn error_text(&self) -> String
pub fn error_text(&self) -> String
What: Standard error as trimmed, lossily decoded text for diagnostics. Why: Failure messages quote what Git said.
In TS you’d write (pseudocode):
output.stderr.trim()Trait Implementations§
impl Eq for GitOutput
impl StructuralPartialEq for GitOutput
Auto Trait Implementations§
impl Freeze for GitOutput
impl RefUnwindSafe for GitOutput
impl Send for GitOutput
impl Sync for GitOutput
impl Unpin for GitOutput
impl UnsafeUnpin for GitOutput
impl UnwindSafe for GitOutput
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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