#[derive(Debug, Clone, PartialEq, Eq)]
pub enum ParsedStageKind {
Explicit,
UnknownExplicit,
Quick,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ParsedStage {
pub kind: ParsedStageKind,
pub verb: String,
pub spec: String,
pub raw: String,
}
impl ParsedStage {
pub fn new(
kind: ParsedStageKind,
verb: impl Into<String>,
spec: impl Into<String>,
raw: impl Into<String>,
) -> Self {
Self {
kind,
verb: verb.into(),
spec: spec.into(),
raw: raw.into(),
}
}
}
#[derive(Debug, Clone, Default, PartialEq, Eq)]
pub struct ParsedPipeline {
pub raw: String,
pub stages: Vec<ParsedStage>,
}