Macro relation

Source
macro_rules! relation {
    () => { ... };
    ($($from:expr => $to:expr),*) => { ... };
}
Expand description

Convenience macro for defining a relation with a static set of pairs.

Example usage:

use relations::{relation, Relation};

let my_relation = relation!(1 => 2, 2 => 3, 3 => 4);