docs.rs failed to build rdispatcher-0.0.3
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
rdispatcher-0.1.0
Rust Dispatcher
The Dispatcher allows you to send messages from multiple broadcasters to multiple receivers. When a lot of messages get passed around a threaded application, centralizing where messages flow through can create much wanted oversight.
The types of messages that get passed around are strongly typed, required by you to setup, and the messages themselves are strings.
Install
Add to your Cargo.toml
rdispatcher = *
And run cargo install
Usage
A simple example:
let mut dispatcher = new;
let sub = new;
let mut brd = new;
dispatcher.register_broadcaster;
dispatcher.register_subscriber;
dispatcher.start;
brd.broadcast;
let message = sub.receiver.recv.unwrap;
assert_eq!;
assert_eq!;
For several full examples, checkout the tests in lib.rs
Caveats
- Currently the DispatchType (I prefer using an enum for it) is cast to a string using Debug. This is legacy and should just use Hash. If you have a custom Debug for your your enum, you might get unexpected results.