pub fn request_stream<R>(
        &mut self,
    ) -> impl Stream<Item = Result<RequestMessage<R>, KfSocketError>> + '_
    where
        RequestMessage<R>: KfDecoder + Debug,
    {
        (&mut self.0).map(|req_bytes_r| match req_bytes_r {
            Ok(req_bytes) => {
                let mut src = Cursor::new(&req_bytes);
                let msg: RequestMessage<R> = RequestMessage::decode_from(&mut src, 0)?;
                Ok(msg)
            }
            Err(err) => Err(err.into()),
        })
    }
/// as server, get stream of request coming from client
as server, get stream of request coming from client
as server get stream of request coming from client
pub fn request_stream<R>(
        &mut self,
    ) -> impl Stream<Item = Result<RequestMessage<R>, KfSocketError>> + '_
    where
        RequestMessage<R>: KfDecoder + Debug,
    {
        (&mut self.0).map(|req_bytes_r| match req_bytes_r {
            Ok(req_bytes) => {
                let mut src = Cursor::new(&req_bytes);
                let msg: RequestMessage<R> = RequestMessage::decode_from(&mut src, 0)?;
                Ok(msg)
            }
            Err(err) => Err(err.into()),
        })
    }
pub fn request_stream < R > ( & mut self , ) -> impl Stream < Item = Result < RequestMessage < R > , KfSocketError > > + ' _ where RequestMessage < R > : KfDecoder + Debug , { ( & mut self . 0 ) . map ( | req_bytes_r | match req_bytes_r { Ok ( req_bytes ) => { let mut src = Cursor :: new ( & req_bytes ) ; let msg : RequestMessage < R > = RequestMessage :: decode_from ( & mut src , 0 ) ? ; Ok ( msg ) } Err ( err ) => Err ( err . into ( ) ) , } ) }
as server, get stream of request coming from client
as server get stream of request coming from client
&mut self
&mut self