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