Struct utils_box::ssh_client::SshClient
source · pub struct SshClient { /* private fields */ }
Implementations§
source§impl SshClient
impl SshClient
pub fn new( server_ip: String, server_port: u16, username: String, password: String ) -> Result<Self>
pub fn local(username: String, password: String) -> Result<Self>
pub fn connection_info(&self) -> (String, u16)
pub fn upload(&self, file: PathBuf, remote_file: PathBuf) -> Result<()>
pub fn download(&self, remote_file: PathBuf, file: PathBuf) -> Result<()>
pub fn execute_cmd(&self, cmd: &str) -> Result<String>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SshClient
impl Send for SshClient
impl Sync for SshClient
impl Unpin for SshClient
impl !UnwindSafe for SshClient
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