blob: 21d87b12aca98be6a805cada1fdeae327c37aaf7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
use std::path::PathBuf;
use serde::Serialize;
use serde::Deserialize;
#[derive(Clone, Debug, Serialize, Deserialize, Eq, PartialEq, Hash)]
#[serde(transparent)]
pub struct PhaseName(String);
impl PhaseName {
pub fn as_str(&self) -> &str {
&self.0
}
}
#[cfg(test)]
impl From<String> for PhaseName {
fn from(s: String) -> Self {
PhaseName(s)
}
}
#[derive(Clone, Debug, Serialize, Deserialize, Eq, PartialEq)]
pub enum Phase {
#[serde(rename = "path")]
Path(PathBuf),
#[serde(rename = "script")]
Text(String),
}
|