pub struct GitRequest {
pub cwd: PathBuf,
pub arguments: Vec<OsString>,
pub without_prefix: bool,
pub index: Option<PathBuf>,
pub object_directory: Option<PathBuf>,
pub environment: Vec<(OsString, OsString)>,
pub unset: Vec<OsString>,
pub input: Option<Vec<u8>>,
}Expand description
What: One Git start: where it runs, its arguments after the global prefix, and its environment and input adjustments. Why: A builder keeps call sites short while every option stays explicit.
In TS you’d write (pseudocode):
type GitRequest = { cwd: string; args: string[]; indexPath?: string; objectDirectory?: string; environment?: Record<string, string>; unset?: string[]; input?: Uint8Array };Fields§
§cwd: PathBufWorking directory.
arguments: Vec<OsString>Arguments after the global prefix.
without_prefix: boolWhether the invocation’s global prefix is left out (shadow and private-store commands).
index: Option<PathBuf>Private index,
as GIT_INDEX_FILE.
object_directory: Option<PathBuf>Object store receiving every written object,
as GIT_OBJECT_DIRECTORY.
environment: Vec<(OsString, OsString)>Variables added after the overlay.
unset: Vec<OsString>Inherited variables removed before the additions apply.
input: Option<Vec<u8>>Bytes on standard input; none means an empty input.
Implementations§
Trait Implementations§
Source§impl Clone for GitRequest
impl Clone for GitRequest
Source§impl Debug for GitRequest
impl Debug for GitRequest
Auto Trait Implementations§
impl Freeze for GitRequest
impl RefUnwindSafe for GitRequest
impl Send for GitRequest
impl Sync for GitRequest
impl Unpin for GitRequest
impl UnsafeUnpin for GitRequest
impl UnwindSafe for GitRequest
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<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