#future #channel #message #message-passing #mezzenger

mezzenger-channel

mezzenger transport over futures channels

2 releases

0.1.1 Sep 13, 2023
0.1.0 Jan 2, 2023

#2046 in Asynchronous

32 downloads per month
Used in mezzenger-utils

Apache-2.0

19KB
358 lines

mezzenger-channel

Transport for communication over futures channels.

https://crates.io/crates/mezzenger-channel

ko-fi

usage

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);

see also

mezzenger


lib.rs:

Transport for communication over futures channels.

Useful for testing and debugging.

See repository for more info.

Example

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);

Dependencies

~1–1.6MB
~32K SLoC