]>
git.proxmox.com Git - pve-lxc-syscalld.git/blob - src/process/cgroups.rs
1 use std
::collections
::HashMap
;
2 use std
::ffi
::{OsStr, OsString}
;
6 pub v1
: Option
<HashMap
<String
, OsString
>>,
7 pub v2
: Option
<OsString
>,
11 pub fn new() -> Self {
15 pub fn get(&self, name
: &str) -> Option
<&OsStr
> {
18 .and_then(|v1
| v1
.get(name
).map(|s
| s
.as_os_str()))
21 pub fn v2(&self) -> Option
<&OsStr
> {
22 self.v2
.as_ref().map(|s
| s
.as_os_str())
25 pub fn has_v1(&self) -> bool
{