windmill_api/models/
runnable_type.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum RunnableType {
17 #[serde(rename = "ScriptHash")]
18 ScriptHash,
19 #[serde(rename = "ScriptPath")]
20 ScriptPath,
21 #[serde(rename = "FlowPath")]
22 FlowPath,
23
24}
25
26impl std::fmt::Display for RunnableType {
27 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
28 match self {
29 Self::ScriptHash => write!(f, "ScriptHash"),
30 Self::ScriptPath => write!(f, "ScriptPath"),
31 Self::FlowPath => write!(f, "FlowPath"),
32 }
33 }
34}
35
36impl Default for RunnableType {
37 fn default() -> RunnableType {
38 Self::ScriptHash
39 }
40}
41