[][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.

Methods

impl Resource[src]

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

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]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Ord for Resource[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl PartialOrd<Resource> for Resource[src]

#[must_use] fn lt(&self, other: &Rhs) -> bool1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use] fn le(&self, other: &Rhs) -> bool1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use] fn gt(&self, other: &Rhs) -> bool1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use] fn ge(&self, other: &Rhs) -> bool1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl PartialEq<Resource> for Resource[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl Copy for Resource[src]

impl Eq for Resource[src]

impl Debug for Resource[src]

impl Hash for Resource[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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.

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

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

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