//! Driver module.
use serde::{Deserialize, Serialize};
/// Pipeline driver.
#[derive(Deserialize, Serialize, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Default)]
#[serde(rename_all = "snake_case")]
pub enum PipelineDriver {
/// Deployer on itself.
#[default]
Deployer,
/// Raw shell.
Shell,
}
impl PipelineDriver {
/// Is Deployer the pipeline's driver?
pub fn is_deployer(&self) -> bool {
matches!(self, PipelineDriver::Deployer)
}
/// Is shell the pipeline's driver?
pub fn is_shell(&self) -> bool {
matches!(self, PipelineDriver::Shell)
}
}