photon_api/models/
account_state.rs

1/*
2 * photon-indexer
3 *
4 * Solana indexer for general compression
5 *
6 * The version of the OpenAPI document: 0.50.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10use std::fmt::Display;
11
12use crate::models;
13
14#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
15pub enum AccountState {
16    #[serde(rename = "initialized")]
17    Initialized,
18    #[serde(rename = "frozen")]
19    Frozen,
20}
21
22impl Display for AccountState {
23    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
24        let str = match self {
25            Self::Initialized => String::from("initialized"),
26            Self::Frozen => String::from("frozen"),
27        };
28        write!(f, "{}", str)
29    }
30}
31
32impl Default for AccountState {
33    fn default() -> AccountState {
34        Self::Initialized
35    }
36}