Trait WebSocketRead

Source
pub trait WebSocketRead {
    // Required method
    fn wisp_read_frame<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        tx: &'life1 LockedWebSocketWrite,
    ) -> Pin<Box<dyn Future<Output = Result<Frame<'static>, WispError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

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

Generic WebSocket read trait.

Required Methods§

Source

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

Read a frame from the socket.

Provided Methods§

Source

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

Read a split frame from the socket.

Implementations on Foreign Types§

Source§

impl<S: AsyncRead + Unpin + Send> WebSocketRead for FragmentCollectorRead<S>

Available on crate feature fastwebsockets only.
Source§

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

Source§

impl<S: AsyncRead + Unpin + Send> WebSocketRead for WebSocketRead<S>

Available on crate feature fastwebsockets only.
Source§

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

Source§

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

Implementors§