Trait WebSocketWrite

Source
pub trait WebSocketWrite {
    // Required methods
    fn wisp_write_frame<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        frame: Frame<'life1>,
    ) -> Pin<Box<dyn Future<Output = Result<(), WispError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn wisp_close<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<(), WispError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn wisp_write_split<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        header: Frame<'life1>,
        body: Frame<'life2>,
    ) -> Pin<Box<dyn Future<Output = Result<(), WispError>> + Send + 'async_trait>>
       where Self: Send + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
}
Expand description

Generic WebSocket write trait.

Required Methods§

Source

fn wisp_write_frame<'life0, 'life1, 'async_trait>( &'life0 mut self, frame: Frame<'life1>, ) -> Pin<Box<dyn Future<Output = Result<(), WispError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Write a frame to the socket.

Source

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

Close the socket.

Provided Methods§

Source

fn wisp_write_split<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, header: Frame<'life1>, body: Frame<'life2>, ) -> Pin<Box<dyn Future<Output = Result<(), WispError>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Write a split frame to the socket.

Implementations on Foreign Types§

Source§

impl<S: AsyncWrite + Unpin + Send> WebSocketWrite for WebSocketWrite<S>

Available on crate feature fastwebsockets only.
Source§

fn wisp_write_frame<'life0, 'life1, 'async_trait>( &'life0 mut self, frame: Frame<'life1>, ) -> Pin<Box<dyn Future<Output = Result<(), WispError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn wisp_write_split<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, header: Frame<'life1>, body: Frame<'life2>, ) -> Pin<Box<dyn Future<Output = Result<(), WispError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

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

Implementors§