Skip to main content

for_each_sync_peer_rule

Macro for_each_sync_peer_rule 

Source
macro_rules! for_each_sync_peer_rule {
    ($($callback:tt)+) => { ... };
}
Expand description

Hands the complete sync rule set to $callback.

This family’s single enumeration. $callback is the path of a macro that accepts a comma-separated list of identifiers, and it is invoked once, with every rule in rules.

§Examples

macro_rules! rule_names {
    ($($name:ident),* $(,)?) => { [ $( stringify!($name) ),* ] };
}

let names = happenstance_sync_testkit::for_each_sync_peer_rule!(rule_names);
assert!(names.contains(&"ingest_never_rejects"));