Trait AsyncSessionStream

Source
pub trait AsyncSessionStream {
    // Required methods
    fn x_with<'life0, 'life1, 'async_trait, R>(
        &'life0 self,
        op: impl 'async_trait + FnMut() -> Result<R, Ssh2Error> + Send,
        sess: &'life1 Session,
        expected_block_directions: BlockDirections,
        sleep_dur: Option<Duration>,
    ) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>>
       where R: 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn poll_x_with<R>(
        &self,
        cx: &mut Context<'_>,
        op: impl FnMut() -> Result<R, IoError> + Send,
        sess: &Session,
        expected_block_directions: BlockDirections,
        sleep_dur: Option<Duration>,
    ) -> Poll<Result<R, IoError>>;

    // Provided methods
    fn rw_with<'life0, 'life1, 'async_trait, R>(
        &'life0 self,
        op: impl 'async_trait + FnMut() -> Result<R, Ssh2Error> + Send,
        sess: &'life1 Session,
    ) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>>
       where R: 'async_trait,
             Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn none_with<'life0, 'life1, 'async_trait, R>(
        &'life0 self,
        op: impl 'async_trait + FnMut() -> Result<R, Ssh2Error> + Send,
        sess: &'life1 Session,
    ) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>>
       where R: 'async_trait,
             Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn read_with<'life0, 'life1, 'async_trait, R>(
        &'life0 self,
        op: impl 'async_trait + FnMut() -> Result<R, Ssh2Error> + Send,
        sess: &'life1 Session,
    ) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>>
       where R: 'async_trait,
             Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn write_with<'life0, 'life1, 'async_trait, R>(
        &'life0 self,
        op: impl 'async_trait + FnMut() -> Result<R, Ssh2Error> + Send,
        sess: &'life1 Session,
    ) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>>
       where R: 'async_trait,
             Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn poll_read_with<R>(
        &self,
        cx: &mut Context<'_>,
        op: impl FnMut() -> Result<R, IoError> + Send,
        sess: &Session,
    ) -> Poll<Result<R, IoError>> { ... }
    fn poll_write_with<R>(
        &self,
        cx: &mut Context<'_>,
        op: impl FnMut() -> Result<R, IoError> + Send,
        sess: &Session,
    ) -> Poll<Result<R, IoError>> { ... }
}

Required Methods§

Source

fn x_with<'life0, 'life1, 'async_trait, R>( &'life0 self, op: impl 'async_trait + FnMut() -> Result<R, Ssh2Error> + Send, sess: &'life1 Session, expected_block_directions: BlockDirections, sleep_dur: Option<Duration>, ) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>>
where R: 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn poll_x_with<R>( &self, cx: &mut Context<'_>, op: impl FnMut() -> Result<R, IoError> + Send, sess: &Session, expected_block_directions: BlockDirections, sleep_dur: Option<Duration>, ) -> Poll<Result<R, IoError>>

Provided Methods§

Source

fn rw_with<'life0, 'life1, 'async_trait, R>( &'life0 self, op: impl 'async_trait + FnMut() -> Result<R, Ssh2Error> + Send, sess: &'life1 Session, ) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>>
where R: 'async_trait, Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn none_with<'life0, 'life1, 'async_trait, R>( &'life0 self, op: impl 'async_trait + FnMut() -> Result<R, Ssh2Error> + Send, sess: &'life1 Session, ) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>>
where R: 'async_trait, Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn read_with<'life0, 'life1, 'async_trait, R>( &'life0 self, op: impl 'async_trait + FnMut() -> Result<R, Ssh2Error> + Send, sess: &'life1 Session, ) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>>
where R: 'async_trait, Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn write_with<'life0, 'life1, 'async_trait, R>( &'life0 self, op: impl 'async_trait + FnMut() -> Result<R, Ssh2Error> + Send, sess: &'life1 Session, ) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>>
where R: 'async_trait, Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn poll_read_with<R>( &self, cx: &mut Context<'_>, op: impl FnMut() -> Result<R, IoError> + Send, sess: &Session, ) -> Poll<Result<R, IoError>>

Source

fn poll_write_with<R>( &self, cx: &mut Context<'_>, op: impl FnMut() -> Result<R, IoError> + Send, sess: &Session, ) -> Poll<Result<R, IoError>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<S> AsyncSessionStream for Async<S>
where S: Send + Sync,

Source§

fn x_with<'life0, 'life1, 'async_trait, R>( &'life0 self, op: impl 'async_trait + FnMut() -> Result<R, Ssh2Error> + Send, sess: &'life1 Session, expected_block_directions: BlockDirections, sleep_dur: Option<Duration>, ) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>>
where R: 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn poll_x_with<R>( &self, cx: &mut Context<'_>, op: impl FnMut() -> Result<R, IoError> + Send, sess: &Session, expected_block_directions: BlockDirections, sleep_dur: Option<Duration>, ) -> Poll<Result<R, IoError>>

Implementors§