| Crates.io | speakeasy |
| lib.rs | speakeasy |
| version | 0.1.0 |
| created_at | 2025-04-17 09:52:13.601614+00 |
| updated_at | 2025-04-17 09:52:13.601614+00 |
| description | JSON-RPC 2.0 made easy! |
| homepage | https://crates.io/crates/ez-jsonrpc |
| repository | https://github.com/aatifsyed/ez-jsonrpc |
| max_upload_size | |
| id | 1637441 |
| size | 58,122 |
Completely generic request/response client built on tower::Service,
futures::Stream and futures::Sink.
sequenceDiagram
participant app as Your Application
participant svc as ez_client::Service
participant task as ez_client::Task
participant transport as TransportT
autonumber
app->>svc: RequestT
svc->>task: ez_client::Ask
note over svc,task: message over a Sink/Stream
task->>transport: (RequestT, IdT)
note over task,transport: message over a Sink/Stream
note over task: wait for response...
transport->>task: (ResponseT, IdT)
task->>app: ResponseT
Service] and [Task].
Stream]/[Sink],
allowing you to configure your own e.g queue depth, MPSC etc.Task] a [Stream]/[Sink] transport to own.
This is typically a wrapper over e.g a websocket connection.call the [Service] with a [Dialogue].Service] formats this into an [Ask] for the [Task].Task] assigns the request an identifier for correlation using an
[IdFactory], and sends the pair to the transport.Task] reacts to the response,
resolving the Future returned in (1).[Task]s also handle timeouts, and propogating errors from the transport.