pub struct Session { /* private fields */ }
Implementations§
Source§impl Session
impl Session
pub fn connect(config: ConfigMap) -> Result<(Self, Receiver<SessionEvent>)>
pub async fn request_pty( &self, term: &str, size: PtySize, command_line: Option<&str>, env: Option<HashMap<String, String>>, ) -> Result<(SshPty, SshChildProcess)>
pub async fn exec( &self, command_line: &str, env: Option<HashMap<String, String>>, ) -> Result<ExecResult>
Sourcepub fn sftp(&self) -> Sftp
pub fn sftp(&self) -> Sftp
Creates a new reference to the sftp channel for filesystem operations
§Note
This does not actually initialize the sftp subsystem and only provides a reference to a means to perform sftp operations. Upon requesting the first sftp operation, the sftp subsystem will be initialized.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnwindSafe for Session
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