snowbridge_core/
operating_mode.rs1use codec::{Decode, Encode, MaxEncodedLen};
2use scale_info::TypeInfo;
3use sp_runtime::RuntimeDebug;
4
5#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)]
7#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
8pub enum BasicOperatingMode {
9 Normal,
11 Halted,
13}
14
15impl Default for BasicOperatingMode {
16 fn default() -> Self {
17 Self::Normal
18 }
19}
20
21impl BasicOperatingMode {
22 pub fn is_halted(&self) -> bool {
23 *self == BasicOperatingMode::Halted
24 }
25}