Struct ssh::LocalSession
source · pub struct LocalSession<S>{ /* private fields */ }
Implementations§
source§impl<S> LocalSession<S>
impl<S> LocalSession<S>
sourcepub fn set_timeout(&mut self, timeout: Option<Duration>)
pub fn set_timeout(&mut self, timeout: Option<Duration>)
Modify the timeout setting in case the user wants to change the timeout during ssh operations.
sourcepub fn open_exec(&mut self) -> SshResult<LocalExec<S>>
pub fn open_exec(&mut self) -> SshResult<LocalExec<S>>
open a LocalExec channel which can excute commands
sourcepub fn open_shell(&mut self) -> SshResult<LocalShell<S>>
pub fn open_shell(&mut self) -> SshResult<LocalShell<S>>
open a LocalShell channel which can download/upload files/directories
sourcepub fn open_shell_terminal(
&mut self,
tv: TerminalSize
) -> SshResult<LocalShell<S>>
pub fn open_shell_terminal( &mut self, tv: TerminalSize ) -> SshResult<LocalShell<S>>
open a LocalShell channel
custom terminal dimensions
pub fn get_raw_io(&mut self) -> Rc<RefCell<S>>
sourcepub fn open_channel(&mut self) -> SshResult<LocalChannel<S>>
pub fn open_channel(&mut self) -> SshResult<LocalChannel<S>>
open a raw channel
need call .exec()
, .shell()
, .scp()
and so on to convert it to a specific channel
Auto Trait Implementations§
impl<S> !RefUnwindSafe for LocalSession<S>
impl<S> !Send for LocalSession<S>
impl<S> !Sync for LocalSession<S>
impl<S> Unpin for LocalSession<S>
impl<S> !UnwindSafe for LocalSession<S>
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