[][src]Enum rlimit::Resource

#[repr(i32)]pub enum Resource {
    AS,
    CORE,
    CPU,
    DATA,
    FSIZE,
    MEMLOCK,
    NOFILE,
    NPROC,
    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.

MEMLOCK

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

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.

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.