1
2
3
4
5
6
7
8
9
use serde::{de::DeserializeOwned, Serialize};
use std::time::Duration;

pub trait TaskLevel: Default + Serialize + DeserializeOwned {
    type Context;
    fn success(&mut self, context: Self::Context);
    fn failure(&mut self, context: Self::Context);
    fn until_next_repetition(&self) -> Duration;
}