This PR adds standardized traits to interact with the websocket clients and future JSON RPC Clients.
[x] Run MessageHandler::handle_message as task
trait Client
Implements the request logic for each client.
trait AsyncClient
An external trait implemented for T: embedded_io_async::Read + embedded_io_async::Write or T: Stream<Output = String> + Sink<String>. It calls the request implementation of the Client trait.
Context of Change
This is needed for #76 to be able to use std and no_std clients with the high level methods.
Type of Change
[x] Refactor (non-breaking change that only restructures code)
High Level Overview of Change
This PR adds standardized traits to interact with the websocket clients and future JSON RPC Clients.
MessageHandler::handle_message
as tasktrait Client
Implements the request logic for each client.
trait AsyncClient
An external trait implemented for
T: embedded_io_async::Read + embedded_io_async::Write
orT: Stream<Output = String> + Sink<String>
. It calls the request implementation of theClient
trait.Context of Change
This is needed for #76 to be able to use
std
andno_std
clients with the high level methods.Type of Change
Test Plan