Crates.io | mezzenger-channel |
lib.rs | mezzenger-channel |
version | 0.1.1 |
source | src |
created_at | 2023-01-02 07:48:42.583025 |
updated_at | 2023-09-13 07:21:48.119867 |
description | mezzenger transport over futures channels. |
homepage | https://github.com/zduny/mezzenger/tree/master/mezzenger-channel |
repository | https://github.com/zduny/mezzenger |
max_upload_size | |
id | 749204 |
size | 21,714 |
Transport for communication over futures channels.
https://crates.io/crates/mezzenger-channel
Add dependencies to Cargo.toml
:
[dependencies]
# ...
mezzenger = "0.1.3"
mezzenger-channel = "0.1.0"
Example code:
let (mut left, mut right) = transports();
left.send("Hello World!").await.unwrap();
right.send(123).await.unwrap();
use mezzenger::Receive;
assert_eq!(right.receive().await.unwrap(), "Hello World!");
assert_eq!(left.receive().await.unwrap(), 123);