use crate::graph::state::State;
use super::Command;
#[derive(Debug)]
pub enum StateOrCommand<S: State> {
State(S),
Command(Command),
}
impl<S: State> From<S> for StateOrCommand<S> {
fn from(state: S) -> Self {
Self::State(state)
}
}
impl<S: State> From<Command> for StateOrCommand<S> {
fn from(cmd: Command) -> Self {
Self::Command(cmd)
}
}