snowbridge_core/
operating_mode.rs
1use codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
2use scale_info::TypeInfo;
3use sp_runtime::RuntimeDebug;
4
5#[derive(
7 Encode,
8 Decode,
9 DecodeWithMemTracking,
10 Clone,
11 Copy,
12 PartialEq,
13 Eq,
14 RuntimeDebug,
15 TypeInfo,
16 MaxEncodedLen,
17)]
18#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
19pub enum BasicOperatingMode {
20 Normal,
22 Halted,
24}
25
26impl Default for BasicOperatingMode {
27 fn default() -> Self {
28 Self::Normal
29 }
30}
31
32impl BasicOperatingMode {
33 pub fn is_halted(&self) -> bool {
34 *self == BasicOperatingMode::Halted
35 }
36}
37
38pub trait ExportPausedQuery {
40 fn is_paused() -> bool;
41}