dagre 0.1.1

A Rust port of dagre - directed graph layout using the Sugiyama method
Documentation
1
2
3
4
5
6
7
/// Generate a unique ID string with the given prefix.
pub fn unique_id(prefix: &str) -> String {
    use std::sync::atomic::{AtomicU64, Ordering};
    static COUNTER: AtomicU64 = AtomicU64::new(0);
    let id = COUNTER.fetch_add(1, Ordering::Relaxed);
    format!("{}{}", prefix, id)
}