Trait spurs::Execute[][src]

pub trait Execute: Sized {
    fn run(&self, cmd: SshCommand) -> Result<SshOutput, SshError>;
fn duplicate(&self) -> Result<Self, SshError>;
fn reconnect(&mut self) -> Result<(), SshError>; }
Expand description

A trait representing types that can run an SshCommand.

Required methods

Run a command on the remote machine, blocking until the command completes.

Note that command using sudo will hang indefinitely if sudo asks for a password.

Attempts to create a new Self with similar credentials to self but using an independent connection. This is useful for running multiple commands in parallel without needing to pass around the parameters everywhere.

Attempt to reconnect to the remote until it reconnects (possibly indefinitely).

Implementors