pub mod ascii;
pub mod dot;
pub mod mermaid;
use std::collections::BTreeSet;
use crate::compiled::CompiledGraph;
use crate::state::GraphState;
#[derive(Debug, Clone, PartialEq, Eq, Ord, PartialOrd)]
pub struct Edge {
pub from: String,
pub to: String,
}
pub(crate) fn extract_edges<S: GraphState>(g: &CompiledGraph<S>) -> Vec<Edge> {
let mut set: BTreeSet<Edge> = BTreeSet::new();
for (from, to) in &g.graph.edges {
set.insert(Edge {
from: from.clone(),
to: to.clone(),
});
}
set.into_iter().collect()
}