pub struct CommitCommand<'a> {
pub context: &'a GitContext,
pub environment: &'a [(OsString, OsString)],
pub arguments: &'a [OsString],
pub subcommand_index: usize,
pub region: &'a CommitRegion,
pub config: &'a CliGitConfig,
pub controls: &'a Controls,
}Expand description
What: Everything the commit command reads from the wrapped invocation. Why: The command needs the identity and the loaded configuration the lifecycle already resolved.
In TS you’d write (pseudocode):
{ rawArgs, gitPath, runtimeResolution, ... }Fields§
§context: &'a GitContextReal Git, its overlay and the global options.
environment: &'a [(OsString, OsString)]The invocation’s environment.
arguments: &'a [OsString]The arguments with the wrapper’s controls removed.
subcommand_index: usizeThe index of commit within the arguments.
region: &'a CommitRegionThe commit options Git’s table read.
config: &'a CliGitConfigThe loaded configuration.
controls: &'a ControlsThe wrapper controls given on the command line.
Auto Trait Implementations§
impl<'a> Freeze for CommitCommand<'a>
impl<'a> RefUnwindSafe for CommitCommand<'a>
impl<'a> Send for CommitCommand<'a>
impl<'a> Sync for CommitCommand<'a>
impl<'a> Unpin for CommitCommand<'a>
impl<'a> UnsafeUnpin for CommitCommand<'a>
impl<'a> UnwindSafe for CommitCommand<'a>
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 more