pub enum SshCommand {
Auto,
Program(OsString),
ShellCommand(OsString),
}Expand description
How the SshTransport invokes ssh.
Auto reproduces Git’s precedence: $GIT_SSH_COMMAND (a shell command
line, run via sh -c), else $GIT_SSH (a program, no shell), else the
ssh program. Embedders that do not want to depend on process-global env
can pin a SshCommand::Program or SshCommand::ShellCommand explicitly.
Variants§
Auto
Resolve from the environment: GIT_SSH_COMMAND, then GIT_SSH, then
the ssh program. This is the default and matches Git.
Program(OsString)
A bare program invoked directly (no shell), like Git’s $GIT_SSH. The
argv is [program, <-p port>, host, remote_cmd].
ShellCommand(OsString)
A shell command line run via sh -c, like Git’s $GIT_SSH_COMMAND. The
command is appended with <-p port> host remote_cmd.
Trait Implementations§
Source§impl Clone for SshCommand
impl Clone for SshCommand
Source§fn clone(&self) -> SshCommand
fn clone(&self) -> SshCommand
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 SshCommand
impl Debug for SshCommand
Source§impl Default for SshCommand
impl Default for SshCommand
Source§fn default() -> SshCommand
fn default() -> SshCommand
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SshCommand
impl RefUnwindSafe for SshCommand
impl Send for SshCommand
impl Sync for SshCommand
impl Unpin for SshCommand
impl UnsafeUnpin for SshCommand
impl UnwindSafe for SshCommand
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