pub struct StatusCommand {
pub executor: CommandExecutor,
pub format: Option<StatusFormat>,
pub branch: bool,
pub show_stash: bool,
pub null_terminate: bool,
pub untracked_files: Option<String>,
pub ignored: bool,
pub paths: Vec<String>,
}Expand description
Builder for git status.
Fields§
§executor: CommandExecutorShared executor.
format: Option<StatusFormat>Output format override.
branch: bool--branch / -b.
show_stash: bool--show-stash.
null_terminate: boolNUL-terminate entries (-z).
untracked_files: Option<String>--untracked-files=<mode>.
ignored: bool--ignored.
paths: Vec<String>Pathspec filters.
Implementations§
Source§impl StatusCommand
impl StatusCommand
Sourcepub fn format(&mut self, f: StatusFormat) -> &mut Self
pub fn format(&mut self, f: StatusFormat) -> &mut Self
Set output format.
Sourcepub fn show_stash(&mut self) -> &mut Self
pub fn show_stash(&mut self) -> &mut Self
Show stash count.
Sourcepub fn null_terminate(&mut self) -> &mut Self
pub fn null_terminate(&mut self) -> &mut Self
NUL-separate entries.
Sourcepub fn untracked_files(&mut self, mode: impl Into<String>) -> &mut Self
pub fn untracked_files(&mut self, mode: impl Into<String>) -> &mut Self
Set untracked-file mode (no, normal, all).
Trait Implementations§
Source§impl Clone for StatusCommand
impl Clone for StatusCommand
Source§fn clone(&self) -> StatusCommand
fn clone(&self) -> StatusCommand
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StatusCommand
impl Debug for StatusCommand
Source§impl Default for StatusCommand
impl Default for StatusCommand
Source§fn default() -> StatusCommand
fn default() -> StatusCommand
Returns the “default value” for a type. Read more
Source§impl GitCommand for StatusCommand
impl GitCommand for StatusCommand
Source§type Output = CommandOutput
type Output = CommandOutput
The typed output produced by this command.
Source§fn get_executor(&self) -> &CommandExecutor
fn get_executor(&self) -> &CommandExecutor
Borrow the shared executor.
Source§fn get_executor_mut(&mut self) -> &mut CommandExecutor
fn get_executor_mut(&mut self) -> &mut CommandExecutor
Mutably borrow the shared executor.
Source§fn build_command_args(&self) -> Vec<String>
fn build_command_args(&self) -> Vec<String>
Build the full argument vector (subcommand + flags + positionals)
excluding the leading
git program.Source§fn execute<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CommandOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CommandOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Run the command and decode its output into
Self::Output.Source§fn execute_raw<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CommandOutput>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn execute_raw<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CommandOutput>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Spawn
git with the given arguments and return the raw output. Read moreSource§fn current_dir<P: Into<PathBuf>>(&mut self, dir: P) -> &mut Self
fn current_dir<P: Into<PathBuf>>(&mut self, dir: P) -> &mut Self
Run
git in the given working directory.Source§fn env<K: Into<OsString>, V: Into<OsString>>(
&mut self,
key: K,
value: V,
) -> &mut Self
fn env<K: Into<OsString>, V: Into<OsString>>( &mut self, key: K, value: V, ) -> &mut Self
Set an environment variable for this invocation.
Source§fn with_timeout(&mut self, timeout: Duration) -> &mut Self
fn with_timeout(&mut self, timeout: Duration) -> &mut Self
Cap execution time. On expiry the process is killed and
Error::Timeout is returned.Source§fn with_timeout_secs(&mut self, seconds: u64) -> &mut Self
fn with_timeout_secs(&mut self, seconds: u64) -> &mut Self
Convenience: set timeout in whole seconds.
Auto Trait Implementations§
impl Freeze for StatusCommand
impl RefUnwindSafe for StatusCommand
impl Send for StatusCommand
impl Sync for StatusCommand
impl Unpin for StatusCommand
impl UnsafeUnpin for StatusCommand
impl UnwindSafe for StatusCommand
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