Trait muxado::OpenClose

source ·
pub trait OpenClose {
    // Required methods
    fn open<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<Stream, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn close<'life0, 'async_trait>(
        &'life0 mut self,
        error: Error,
        msg: String
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait for opening new streams in a muxado Session.

Required Methods§

source

fn open<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<Stream, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Open a new stream.

source

fn close<'life0, 'async_trait>( &'life0 mut self, error: Error, msg: String ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Close the session by sending a GOAWAY

Implementors§