macro_rules! event_matches {
($m: pat) => { ... };
}
Expand description
A macro which can be used to match an event with enum for Hub
subscription condition
§Examples
use roboplc::event_matches;
enum Message {
Temperature(f64),
Flush,
Other
}
let condition_fn = event_matches!(Message::Temperature(_) | (Message::Flush));