pub struct ShowRefCommand {
pub executor: CommandExecutor,
pub patterns: Vec<String>,
pub heads: bool,
pub tags: bool,
pub verify: bool,
pub hash: Option<Option<u32>>,
pub dereference: bool,
pub head: bool,
pub exists: bool,
pub quiet: bool,
}Expand description
Builder for git show-ref.
Fields§
§executor: CommandExecutorShared executor.
patterns: Vec<String>Patterns to match.
heads: bool--heads.
--tags.
verify: bool--verify: error if a pattern doesn’t match.
hash: Option<Option<u32>>--hash[=N].
dereference: bool--dereference.
head: bool--head.
exists: bool--exists: test existence of a specific ref.
quiet: bool-q quiet.
Implementations§
Source§impl ShowRefCommand
impl ShowRefCommand
Limit to tag refs.
Sourcepub fn dereference(&mut self) -> &mut Self
pub fn dereference(&mut self) -> &mut Self
--dereference.
Sourcepub fn include_head(&mut self) -> &mut Self
pub fn include_head(&mut self) -> &mut Self
Include HEAD in output (--head).
Trait Implementations§
Source§impl Clone for ShowRefCommand
impl Clone for ShowRefCommand
Source§fn clone(&self) -> ShowRefCommand
fn clone(&self) -> ShowRefCommand
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 ShowRefCommand
impl Debug for ShowRefCommand
Source§impl Default for ShowRefCommand
impl Default for ShowRefCommand
Source§fn default() -> ShowRefCommand
fn default() -> ShowRefCommand
Returns the “default value” for a type. Read more
Source§impl GitCommand for ShowRefCommand
impl GitCommand for ShowRefCommand
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 ShowRefCommand
impl RefUnwindSafe for ShowRefCommand
impl Send for ShowRefCommand
impl Sync for ShowRefCommand
impl Unpin for ShowRefCommand
impl UnsafeUnpin for ShowRefCommand
impl UnwindSafe for ShowRefCommand
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