Crates.io | async-io-converse |
lib.rs | async-io-converse |
version | 3.0.0 |
source | src |
created_at | 2022-12-30 22:43:09.817861 |
updated_at | 2023-01-29 21:33:19.330406 |
description | Can conduct a conversation over any AsyncRead or AsyncWrite type with serde compatible types |
homepage | |
repository | https://github.com/Xaeroxe/async-io-converse |
max_upload_size | |
id | 748140 |
size | 42,374 |
A wrapper over the async-io-typed
crate which allows
serde
compatible types to be sent over any duplex connection that has types that implement
AsyncRead
and AsyncWrite
. async-io-converse
adds the ability to receive replies from the other process.
If you have two endpoints that need to communicate with each other and
Deserialize
and Serialize
traits.Then this crate might be useful to you!
If the endpoints are in the same process then you should not use this crate. You're better served by existing async mpsc channels.
Many crates provide async mpsc channels, including futures
and tokio
. Pick your favorite implementation. Additionally, if you're
trying to interface with a process that doesn't have Rust code, and can't adopt a Rust portion, this crate will hurt much more than
it will help. Consider using protobufs or JSON if Rust adoption is a blocker.
async-io-typed
directly?async-io-converse
is built on top of async-io-typed
and provides the ability to create and send replies, which
the peer can then act on. async-io-converse
also requires a duplex connection, unlike async-io-typed
.
Contributions are welcome! Please ensure your changes to the code pass unit tests. If you're fixing a bug please add a unit test so that someone doesn't un-fix the bug later.