[−][src]Struct spurs::SshCommand
Implementations
impl SshCommand
[src]
pub fn new(cmd: &str) -> Self
[src]
Create a new builder for the given command with default options.
pub fn cwd<P: AsRef<Path>>(self, cwd: P) -> Self
[src]
Change the current working directory to cwd
before executing.
pub fn use_bash(self) -> Self
[src]
Execute using bash.
pub fn allow_error(self) -> Self
[src]
Allow a non-zero exit code. Normally, an error would occur and we would return early.
pub fn dry_run(self, is_dry: bool) -> Self
[src]
Don't actually execute any command remotely. Just print the command that would be executed and return success. Note that we still connect to the remote. This is useful for debugging.
pub fn no_pty(self) -> Self
[src]
Don't request a psuedo-terminal (pty). It turns out that some commands behave differently with a pty. I'm not really sure what causes this.
NOTE: You need a pty for sudo
.
Trait Implementations
impl Debug for SshCommand
[src]
impl Eq for SshCommand
[src]
impl PartialEq<SshCommand> for SshCommand
[src]
fn eq(&self, other: &SshCommand) -> bool
[src]
fn ne(&self, other: &SshCommand) -> bool
[src]
impl StructuralEq for SshCommand
[src]
impl StructuralPartialEq for SshCommand
[src]
Auto Trait Implementations
impl RefUnwindSafe for SshCommand
impl Send for SshCommand
impl Sync for SshCommand
impl Unpin for SshCommand
impl UnwindSafe for SshCommand
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,