use std::{fmt, path::PathBuf};
use crate::paths::ProfileDir;
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct ProfileParamsFile(PathBuf);
crate::paths::pathbuf_newtype!(ProfileParamsFile);
impl ProfileParamsFile {
pub const NAME: &'static str = "profile_params.yaml";
}
impl From<&ProfileDir> for ProfileParamsFile {
fn from(profile_dir: &ProfileDir) -> Self {
let path = profile_dir.join(Self::NAME);
Self(path)
}
}
impl fmt::Display for ProfileParamsFile {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", self.0.display())
}
}