Enum sfsm_base::TransitGuard [−][src]
pub enum TransitGuard {
Remain,
Transit,
}Expand description
Enum used to indicate to the guard function if the transition should transit to the next state or remain in the current one.
fn guard(&self) -> TransitGuard {
let foo = 0;
if foo == 0 {
TransitGuard::Remain
} else {
TransitGuard::Transit
}
}Variants
Remains in the current state
Transits into the next state
Trait Implementations
Implements from
fn guard(&self) -> TransitGuard {
let foo = 0;
(foo == 0).into() // Returns TransitGuard::Transit
}