logo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::prelude::Agenda;

/// Objects intending to provide an [Agenda] driven state machine should implement this interface.
///
pub trait AgendaManager {
    /// The object's current agenda.
    fn agenda(&self) -> Agenda;

    /// Change the object's current agenda.
    /// Returns true if the agenda has changed, false otherwise.
    /// 
    /// # Arguments
    /// 
    /// * `val` - The new agenda.  If none is specified will assign to Agenda::ALWAYS.
    /// 
    fn set_egenda(&self, val: Agenda) -> bool;
}