Macro duskphantom_graph::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();