I'm trying to implement poll_next for for a struct that communicates over a web socket (tokio_tungstenite).
The challenge I have is, to produce one message for my app, I need to consume two or more messages over the websocket.
For the first web socket message I can simply call poll_next on the web socket, and if it doesn't return an item, return pending.
What I can't figure out is how to wait for the following messages, i.e. my code may have to make several calls to the web socket poll_next before I can return a message.
It would be awesome if anyone has done this or could point me to some code that does something similar.