reify-graph
Safe library to convert Rc<RefCell<T>>-based pointer graphs into
node-indexed adjacency representations and back.
This enables serialization, inspection, and transformation of cyclic and DAG-structured data that would otherwise be difficult to work with.
Examples
use ;
use RefCell;
use Rc;
// A simple tree node
let leaf = new;
let root = new;
// Reify the graph
let graph = reify_graph;
assert_eq!;
assert_eq!;
// Reconstruct the graph
let reconstructed = reflect_graph;
assert_eq!;
assert_eq!;
assert_eq!;