Primitive node identifier helpers.
The crate keeps node identifiers explicit and lightweight through a small
NodeId wrapper around usize.
Examples
use ;
let nodes = node_ids;
let unique = unique_nodes;
assert!;
assert_eq!;
Primitive node identifier helpers.
The crate keeps node identifiers explicit and lightweight through a small
NodeId wrapper around usize.
use use_node::{NodeId, contains_node, node_ids, unique_nodes};
let nodes = node_ids(3);
let unique = unique_nodes(&[NodeId::new(2), NodeId::new(1), NodeId::new(2)]);
assert!(contains_node(&nodes, NodeId::new(1)));
assert_eq!(unique, vec![NodeId::new(2), NodeId::new(1)]);