Crates.io | bichannel |
lib.rs | bichannel |
version | 0.0.4 |
source | src |
created_at | 2020-11-09 14:06:34.451675 |
updated_at | 2020-11-09 15:07:39.67468 |
description | Zero dependency std::mpsc based bidirectional channel |
homepage | |
repository | https://github.com/nkconnor/bichannel |
max_upload_size | |
id | 310314 |
size | 10,476 |
A zero dependency std::sync::mpsc
based bidirectional channel. Each side can send
and receive with its counterpart
bichannel = "1"
Example Usage
let (left, right) = bichannel::channel();
// Send from the left to the right
left.send(1).unwrap();
assert_eq!(Ok(1), right.recv());
// Send from the right to the left
right.send(2).unwrap();
assert_eq!(Ok(2), left.recv());
TODO MIT/APACHE
Bug reports, feature requests, and contributions are warmly welcomed.
NOTE: This README uses cargo-readme. To
update the README, use cargo readme > README.md