Skip to main content

pyth_lazer_protocol/
symbol_state.rs

1use {
2    serde::{Deserialize, Serialize},
3    std::fmt::Display,
4};
5
6#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
7#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
8#[serde(rename_all = "snake_case")]
9pub enum SymbolState {
10    ComingSoon,
11    Stable,
12    Inactive,
13    Beta,
14}
15
16impl Display for SymbolState {
17    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
18        match self {
19            SymbolState::ComingSoon => write!(f, "coming_soon"),
20            SymbolState::Stable => write!(f, "stable"),
21            SymbolState::Inactive => write!(f, "inactive"),
22            SymbolState::Beta => write!(f, "beta"),
23        }
24    }
25}