If there's a better/established way of doing this, let me know.
Currently the WebSockets callback doesn't have any return value. The event_loop() returns a Result, but it's limited to errors that might arise strictly from the websockets. Any problems within the callback is limited to a panic. Allowing the callback to return its own Result, that would be bubbled up through to the return value of the event_loop() helps write smarter error handling around websocket events.
This changes the function signature of the callback arg, thus breaking the current API. I've gone and updated the examples, but consumers will not be able to simply upgrade the package version without modifications themselves
If there's a better/established way of doing this, let me know.
Currently the WebSockets callback doesn't have any return value. The event_loop() returns a Result, but it's limited to errors that might arise strictly from the websockets. Any problems within the callback is limited to a panic. Allowing the callback to return its own Result, that would be bubbled up through to the return value of the event_loop() helps write smarter error handling around websocket events.
This changes the function signature of the callback arg, thus breaking the current API. I've gone and updated the examples, but consumers will not be able to simply upgrade the package version without modifications themselves