#[derive(Default, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[derive(Deserialize, Serialize)]
#[serde(default, deny_unknown_fields)]
pub struct FileSystemLayout
{
#[allow(missing_docs)]
pub sys_path: SysPath,
#[allow(missing_docs)]
pub proc_path: ProcPath,
#[allow(missing_docs)]
pub dev_path: DevPath,
#[allow(missing_docs)]
pub etc_path: EtcPath,
}
impl FileSystemLayout
{
#[inline(always)]
pub fn paths(&self) -> (&SysPath, &ProcPath, &DevPath, &EtcPath)
{
(
&self.sys_path,
&self.proc_path,
&self.dev_path,
&self.etc_path,
)
}
#[inline(always)]
pub fn defaults(&self) -> io::Result<DefaultHugePageSizes>
{
DefaultHugePageSizes::new(&self.sys_path, &self.proc_path)
}
}