[][src]Struct spurs::SshCommand

pub struct SshCommand { /* fields omitted */ }

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]

impl StructuralEq for SshCommand[src]

impl StructuralPartialEq for SshCommand[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.