nice top level command dispatch

This commit is contained in:
🪞👃🪞 2025-01-12 01:16:05 +01:00
parent aad7aa6c5e
commit 8dcf73c18c
8 changed files with 137 additions and 144 deletions

View file

@ -34,12 +34,11 @@ pub enum ClockCommand {
SetQuant(f64),
SetSync(f64),
}
impl ClockCommand {
pub fn from_edn <'a> (head: &EdnItem<&str>, tail: &'a [EdnItem<String>]) -> Self {
impl<T: HasClock> EdnCommand<T> for ClockCommand {
fn from_edn <'a> (state: &T, head: &EdnItem<&str>, tail: &'a [EdnItem<String>]) -> Self {
todo!()
}
}
impl<T: HasClock> Command<T> for ClockCommand {
fn execute (self, state: &mut T) -> Perhaps<Self> {
use ClockCommand::*;