1
0
Fork 0
mirror of https://github.com/containers/youki synced 2024-05-17 21:16:30 +02:00
youki/cgroups/src/v2/controller_type.rs
2021-08-12 11:31:26 +02:00

24 lines
517 B
Rust

pub enum ControllerType {
Cpu,
CpuSet,
Io,
Memory,
HugeTlb,
Pids,
Freezer,
}
impl ToString for ControllerType {
fn to_string(&self) -> String {
match self {
Self::Cpu => "cpu".into(),
Self::CpuSet => "cpuset".into(),
Self::Io => "io".into(),
Self::Memory => "memory".into(),
Self::HugeTlb => "hugetlb".into(),
Self::Pids => "pids".into(),
Self::Freezer => "freezer".into(),
}
}
}