Macro kaori_hsm::handled

source ·
macro_rules! handled {
    () => { ... };
}
Expand description

Sugar for constructing a HandleResult::Handle enum variant meaning the event has been caught without transition occuring.

#[state(super_state= Top)]
impl State<S0> for BasicStateMachine{

    fn handle(&mut self, evt: & BasicEvt) -> HandleResult<Self> {
        match evt{
            BasicEvt::A => {
                println!("S0-HANDLES-A");
                handled!()
            }
        }
    }    
}