use derive_builder::Builder;
const PHASE_TOKEN_DEFAULT_REGEX_PATTERN: &str = "__[A-Z0-9_]+__";
#[derive(Debug)]
pub struct Config {
pub command: Command,
pub rapl_path: Option<String>,
}
#[derive(Debug, Clone)]
pub enum Command {
Profile(ProfileConfig),
ListSensors,
}
#[derive(Debug, Clone, Builder)]
pub struct ProfileConfig {
#[builder(default, setter(strip_option))]
pub stdout_file: Option<String>,
pub cmd: Vec<String>,
#[builder(default = PHASE_TOKEN_DEFAULT_REGEX_PATTERN.to_string())]
pub token_pattern: String,
pub use_root: bool,
}