udgraph

Macro udgraph 

Source
macro_rules! udgraph {
    ($({$key:tt $sep:tt $($tos:tt),*}$(,)?)*) => { ... };
    ($n_ty:ty;$({$key:tt $sep:tt $($tos:tt),*}$(,)?)*) => { ... };
}
Expand description

a macro to create a graph

ยงExample

use duskphantom_graph::*;
let g: UdGraph<u32> = udgraph!(
   {1 -> 2,3},
  {2 -> 3}
).unwrap();

or

use duskphantom_graph::*;
let g: UdGraph<u32> = udgraph!(u32; {1 -> 2,3}, {2 -> 3}).unwrap();