pub trait CheckOpensshConnection {
    // Required method
    fn check_connection<'session>(
        self: Box<Self>,
        session: &'session Session
    ) -> Pin<Box<dyn Future<Output = Result<(), OpensshError>> + Send + Sync + 'session>>;
}
Available on crate feature openssh only.
Expand description

Check for openssh connection to be alive

Required Methods§

source

fn check_connection<'session>( self: Box<Self>, session: &'session Session ) -> Pin<Box<dyn Future<Output = Result<(), OpensshError>> + Send + Sync + 'session>>

This function should only return on Err(). Once the sftp session is closed, the future will be cancelled (dropped).

Implementors§

source§

impl<F> CheckOpensshConnection for F
where F: for<'session> FnOnce(&'session Session) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + Sync + 'session>>,