pub struct Connection {
pub config: Configuration,
pub session: Session,
pub known_hosts: KnownHosts,
}
Fields§
§config: Configuration
§session: Session
§known_hosts: KnownHosts
Implementations§
Source§impl Connection
impl Connection
pub fn new(config: &Configuration) -> Result<Self>
pub fn add_known_host(&mut self, known_host: &KnownHost) -> Result<()>
pub fn get_remote_host_key(&self) -> Option<(String, HostKeyType)>
pub fn start(&mut self) -> Result<()>
pub fn read_over_sftp(&self, path: &str) -> Result<SftpReader>
pub fn write_over_sftp(&self, path: &str) -> Result<SftpWriter>
pub fn list_over_sftp(&self, path: &str) -> Result<Vec<SftpEntry>>
Trait Implementations§
impl Send for Connection
Auto Trait Implementations§
impl Freeze for Connection
impl !RefUnwindSafe 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