use crate::SessionSorts;
use ambassador::delegatable_trait;
use std::time::Duration;
#[delegatable_trait]
pub trait AttentionAlg: SessionSorts {
fn begun(&mut self, id: &Self::Id, holdable: bool);
fn heard(&mut self, id: &Self::Id, report: Self::Report);
fn ran_for(&mut self, id: &Self::Id, elapsed: Duration);
fn ended(&mut self, id: &Self::Id, ending: Result<Self::Ending, Self::Refusal>);
fn wanted(&self, id: &Self::Id) -> Wanted;
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Wanted {
Running,
Held,
Unwanted,
}