[][src]Enum rctl::Resource

pub enum Resource {
    CpuTime,
    DataSize,
    StackSize,
    CoreDumpSize,
    MemoryUse,
    MemoryLocked,
    MaxProcesses,
    OpenFiles,
    VMemoryUse,
    PseudoTerminals,
    SwapUse,
    NThreads,
    MsgqQueued,
    MsgqSize,
    NMsgq,
    Nsem,
    NSemop,
    NShm,
    ShmSize,
    Wallclock,
    PercentCpu,
    ReadBps,
    WriteBps,
    ReadIops,
    WriteIops,
}

An Enum representing a resource type

Variants

CPU time, in seconds

datasize, in bytes

stack size, in bytes

from the FreeBSD Handbook Chapter 13.13 - Resource Limits:

The maximum size of a process stack. This alone is not sufficient to limit the amount of memory a program may use, so it should be used in conjunction with other limits.

coredump size, in bytes

from the FreeBSD Handbook Chapter 13.13 - Resource Limits:

The limit on the size of a core file generated by a program is subordinate to other limits on disk usage, such as filesize or disk quotas. This limit is often used as a less severe method of controlling disk space consumption. Since users do not generate core files and often do not delete them, this setting may save them from running out of disk space should a large program crash.

resident setsize, in bytes

locked memory, in bytes

from the FreeBSD Handbook Chapter 13.13 - Resource Limits:

The maximum amount of memory a process may request to be locked into main memory using mlock(2). Some system-critical programs, such as amd(8), lock into main memory so that if the system begins to swap, they do not contribute to disk thrashing.

number of processes

File descriptor table size

address space limit, in bytes

number of PTYs

swapspace that may be reserved or used, in bytes

number of threads

number of queued SysV messages

SysVmessagequeue size, in bytes

number of SysV message queues

number of SysV semaphores

number of SysV semaphores modified in a single semop(2) call

number of SysV shared memorysegments

SysVshared memory size, in bytes

wallclock time, in seconds

%CPU, in percents of a single CPU core

filesystem reads, in bytes per second

filesystem writes, in bytes per second

filesystem reads, inoperations per second

filesystem writes, in operations persecond

Methods

impl Resource
[src]

Return the string representation of the resource

Examples

use rctl::Resource;
assert_eq!(Resource::CpuTime.as_str(), "cputime");

Trait Implementations

impl Eq for Resource
[src]

impl<'a> Into<&'static str> for &'a Resource
[src]

Performs the conversion.

impl<'a> Into<String> for &'a Resource
[src]

Performs the conversion.

impl PartialEq<Resource> for Resource
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Copy for Resource
[src]

impl Clone for Resource
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Hash for Resource
[src]

Feeds this value into the given [Hasher]. Read more

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

impl Display for Resource
[src]

Formats the value using the given formatter. Read more

impl Debug for Resource
[src]

Formats the value using the given formatter. Read more

impl FromStr for Resource
[src]

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

Auto Trait Implementations

impl Send for Resource

impl Sync for Resource

Blanket Implementations

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

Performs the conversion.

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

Creates owned data from borrowed data, usually by cloning. Read more

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> ToString for T where
    T: Display + ?Sized
[src]

Converts the given value to a String. Read more

impl<T> From for T
[src]

Performs the conversion.

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

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

The type returned in the event of a conversion error.

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

Performs the conversion.

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

Immutably borrows from an owned value. Read more

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

Mutably borrows from an owned value. Read more

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

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

The type returned in the event of a conversion error.

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

Performs the conversion.

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

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

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more