use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Action {
#[serde(rename = "ACTION_UNSPECIFIED")]
ActionUnspecified,
#[serde(rename = "ACTION_SCAN")]
ActionScan,
#[serde(rename = "ACTION_CLICK")]
ActionClick,
}
impl std::fmt::Display for Action {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::ActionUnspecified => write!(f, "ACTION_UNSPECIFIED"),
Self::ActionScan => write!(f, "ACTION_SCAN"),
Self::ActionClick => write!(f, "ACTION_CLICK"),
}
}
}
impl Default for Action {
fn default() -> Action {
Self::ActionUnspecified
}
}