pub fn is_switch_allowed(&self, from: OperationalMode) -> bool {
    match self {
      OperationalMode::Standby => !matches!(from, OperationalMode::Standby),
      OperationalMode::Cycle(_) => !matches!(from, OperationalMode::Cycle(_))
    }
  }
/// Determines if it is valid to switch to this mode from the given previous
/// mode.
Determines if it is valid to switch to this mode from the given previous
mode.
Determines if it is valid to switch to this mode from the given previous mode .
pub fn is_switch_allowed(&self, from: OperationalMode) -> bool {
    match self {
      OperationalMode::Standby => !matches!(from, OperationalMode::Standby),
      OperationalMode::Cycle(_) => !matches!(from, OperationalMode::Cycle(_))
    }
  }
pub fn is_switch_allowed ( & self , from : OperationalMode ) -> bool { match self { OperationalMode :: Standby => ! matches ! ( from OperationalMode Standby ) , OperationalMode :: Cycle ( _ ) => ! matches ! ( from OperationalMode Cycle ( ) ) } }
Determines if it is valid to switch to this mode from the given previous
mode.
Determines if it is valid to switch to this mode from the given previous mode .
&self
from
OperationalMode
&self
from
OperationalMode