You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
585 B
Rust

use std::collections::{HashMap, HashSet};
#[derive(Clone, Default, Debug)]
pub struct Graph {
pub nodes: HashMap<u32, Node>,
pub node_names: HashMap<String, u32>,
}
#[derive(Clone, Default, Debug)]
pub struct Node {
pub name: Option<String>,
// Set string to command
pub command: Option<String>,
pub edges: Vec<Edge>,
}
#[derive(Clone, Copy, Debug, Ord, PartialOrd, Eq, PartialEq, Hash)]
pub enum Transport {
Err,
Out,
}
#[derive(Clone, Default, Debug)]
pub struct Edge {
pub from: u32,
pub to: u32,
pub transports: HashSet<Transport>,
}