rustix/backend/linux_raw/process/
types.rs

1/// A resource value for use with [`getrlimit`], [`setrlimit`], and
2/// [`prlimit`].
3///
4/// [`getrlimit`]: crate::process::getrlimit
5/// [`setrlimit`]: crate::process::setrlimit
6/// [`prlimit`]: crate::process::prlimit
7#[derive(Copy, Clone, Debug, Eq, PartialEq)]
8#[repr(u32)]
9#[non_exhaustive]
10pub enum Resource {
11    /// `RLIMIT_CPU`
12    Cpu = linux_raw_sys::general::RLIMIT_CPU,
13    /// `RLIMIT_FSIZE`
14    Fsize = linux_raw_sys::general::RLIMIT_FSIZE,
15    /// `RLIMIT_DATA`
16    Data = linux_raw_sys::general::RLIMIT_DATA,
17    /// `RLIMIT_STACK`
18    Stack = linux_raw_sys::general::RLIMIT_STACK,
19    /// `RLIMIT_CORE`
20    Core = linux_raw_sys::general::RLIMIT_CORE,
21    /// `RLIMIT_RSS`
22    Rss = linux_raw_sys::general::RLIMIT_RSS,
23    /// `RLIMIT_NPROC`
24    Nproc = linux_raw_sys::general::RLIMIT_NPROC,
25    /// `RLIMIT_NOFILE`
26    Nofile = linux_raw_sys::general::RLIMIT_NOFILE,
27    /// `RLIMIT_MEMLOCK`
28    Memlock = linux_raw_sys::general::RLIMIT_MEMLOCK,
29    /// `RLIMIT_AS`
30    As = linux_raw_sys::general::RLIMIT_AS,
31    /// `RLIMIT_LOCKS`
32    Locks = linux_raw_sys::general::RLIMIT_LOCKS,
33    /// `RLIMIT_SIGPENDING`
34    Sigpending = linux_raw_sys::general::RLIMIT_SIGPENDING,
35    /// `RLIMIT_MSGQUEUE`
36    Msgqueue = linux_raw_sys::general::RLIMIT_MSGQUEUE,
37    /// `RLIMIT_NICE`
38    Nice = linux_raw_sys::general::RLIMIT_NICE,
39    /// `RLIMIT_RTPRIO`
40    Rtprio = linux_raw_sys::general::RLIMIT_RTPRIO,
41    /// `RLIMIT_RTTIME`
42    Rttime = linux_raw_sys::general::RLIMIT_RTTIME,
43}