pub async fn wait(mut self) -> Result<SessionStatus, (Error, Self)> {
        use EstablishedSessionState::*;

        match self.wait_impl().await {
            Ok(Exited(exit_value)) => Ok(SessionStatus::Exited { exit_value }),
            Ok(TtyAllocFail) => Ok(SessionStatus::TtyAllocFail(self)),
            Err(err) => Err((err, self)),
        }
    }
/// Wait for session status to change
///
/// Return `Self` on error so that you can handle the error and restart
/// the operation.
///
/// If the server close the connection without sending anything,
/// this function would return `Ok(None)`.
Wait for session status to change
Return `Self` on error so that you can handle the error and restart
the operation.

If the server close the connection without sending anything,
this function would return `Ok(None)`.
Wait for session status to change Return ` Self ` on error so that you can handle the error and restart the operation . If the server close the connection without sending anything this function would return ` Ok ( None ) ` .
pub async fn wait(mut self) -> Result<SessionStatus, (Error, Self)> {
        use EstablishedSessionState::*;
        match self.wait_impl().await {
            Ok(Exited(exit_value)) => Ok(SessionStatus::Exited { exit_value }),
            Ok(TtyAllocFail) => Ok(SessionStatus::TtyAllocFail(self)),
            Err(err) => Err((err, self)),
        }
    }
pub async fn wait ( mut self ) -> Result < SessionStatus , ( Error , Self ) > { use EstablishedSessionState :: * ; match self . wait_impl ( ) . await { Ok ( Exited ( exit_value ) ) => Ok ( SessionStatus :: Exited { exit_value } ) , Ok ( TtyAllocFail ) => Ok ( SessionStatus :: TtyAllocFail ( self ) ) , Err ( err ) => Err ( ( err , self ) ) , } }
Wait for session status to change
Return `Self` on error so that you can handle the error and restart
the operation.
Wait for session status to change Return ` Self ` on error so that you can handle the error and restart the operation .
mut self