pub struct Connection { /* private fields */ }Expand description
SSH connection wrapper
Implementations§
Source§impl Connection
impl Connection
Sourcepub fn is_connected(&self) -> bool
pub fn is_connected(&self) -> bool
Check if the connection is active
Sourcepub fn process_mut(&mut self) -> Option<&mut Child>
pub fn process_mut(&mut self) -> Option<&mut Child>
Get mutable reference to the SSH process
Sourcepub fn take_process(&mut self) -> Option<Child>
pub fn take_process(&mut self) -> Option<Child>
Take ownership of the SSH process
Sourcepub async fn close(&mut self) -> Result<(), TransportError>
pub async fn close(&mut self) -> Result<(), TransportError>
Close the connection
Sourcepub fn stdin(&mut self) -> Option<&mut ChildStdin>
pub fn stdin(&mut self) -> Option<&mut ChildStdin>
Get stdin handle for writing to the remote process
Sourcepub fn stdout(&mut self) -> Option<&mut ChildStdout>
pub fn stdout(&mut self) -> Option<&mut ChildStdout>
Get stdout handle for reading from the remote process
Sourcepub fn stderr(&mut self) -> Option<&mut ChildStderr>
pub fn stderr(&mut self) -> Option<&mut ChildStderr>
Get stderr handle for reading errors from the remote process
Trait Implementations§
Source§impl Debug for Connection
impl Debug for Connection
Auto Trait Implementations§
impl Freeze for Connection
impl !RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl !UnwindSafe for Connection
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