[][src]Enum rlimit::Resource

#[repr(i32)]pub enum Resource {
    AS,
    CORE,
    CPU,
    DATA,
    FSIZE,
    LOCKS,
    MEMLOCK,
    MSGQUEUE,
    NICE,
    NOFILE,
    NPROC,
    RSS,
    RTPRIO,
    RTTIME,
    SIGPENDING,
    STACK,
}

Enum type used for resource values.

Variants

AS

The maximum size (in bytes) of the process's virtual memory (address space).

CORE

The maximum size (in bytes) of a core file that the process may dump.

CPU

A limit (in seconds) on the amount of CPU time that the process can consume.

DATA

The maximum size (in bytes) of the process's data segment (initialized data, uninitialized data, and heap).

FSIZE

The maximum size (in bytes) of files that the process may create.

LOCKS

A limit on the combined number of flock(2) locks and fcntl(2) leases that this process may establish.

MEMLOCK

The maximum number (in bytes) of memory that may be locked into RAM.

MSGQUEUE

A limit on the number of bytes that can be allocated for POSIX message queues for the real user ID of the calling process.

NICE

This specifies a ceiling to which the process's nice value can be raised using setpriority(2) or nice(2).

NOFILE

This specifies a value one greater than the maximum file descriptor number that can be opened by this process.

NPROC

A limit on the number of extant process (or, more precisely on Linux, threads) for the real user ID of the calling process.

RSS

A limit (in bytes) on the process's resident set (the number of virtual pages resident in RAM).

RTPRIO

This specifies a ceiling on the real-time priority that may be set for this process using sched_setscheduler(2) and sched_setparam(2).

RTTIME

A limit (in microseconds) on the amount of CPU time that a process scheduled under a real-time scheduling policy may consume without making a blocking system call.

SIGPENDING

A limit on the number of signals that may be queued for the real user ID of the calling process.

STACK

The maximum size (in bytes) of the process stack.

Implementations

impl Resource[src]

pub const fn as_raw_resource(self) -> RawResource[src]

Returns the raw resource type

pub fn set(self, soft: rlim, hard: rlim) -> Result<()>[src]

Set resource limits.

pub fn get(self) -> Result<(rlim, rlim)>[src]

Get resource limits.

Trait Implementations

impl Clone for Resource[src]

impl Copy for Resource[src]

impl Debug for Resource[src]

impl Eq for Resource[src]

impl FromStr for Resource[src]

type Err = ParseResourceError

The associated error which can be returned from parsing.

fn from_str(s: &str) -> Result<Self, Self::Err>[src]

Parse a Resource from a &str

impl Hash for Resource[src]

impl Ord for Resource[src]

impl PartialEq<Resource> for Resource[src]

impl PartialOrd<Resource> for Resource[src]

impl StructuralEq for Resource[src]

impl StructuralPartialEq for Resource[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.