[−][src]Struct rlimit::Resource
A kind of resource.
Be careful: The documentation of Resource
constants are based on Linux and FreeBSD.
It may be inconsistent with other platforms.
References
Linux: https://man7.org/linux/man-pages/man2/getrlimit.2.html
FreeBSD: https://www.freebsd.org/cgi/man.cgi?query=getrlimit
Implementations
impl Resource
[src]
pub const AS: Self
[src]
The maximum size (in bytes) of the process's virtual memory (address space).
pub const CORE: Self
[src]
The maximum size (in bytes) of a core file that the process may dump.
pub const CPU: Self
[src]
A limit (in seconds) on the amount of CPU time that the process can consume.
pub const DATA: Self
[src]
The maximum size (in bytes) of the process's data segment (initialized data, uninitialized data, and heap).
pub const FSIZE: Self
[src]
The maximum size (in bytes) of files that the process may create.
pub const LOCKS: Self
[src]
(early Linux 2.4 only)
A limit on the combined number
of flock(2)
locks and fcntl(2)
leases
that this process may establish.
pub const MEMLOCK: Self
[src]
The maximum number (in bytes) of memory that may be locked into RAM.
pub const MSGQUEUE: Self
[src]
A limit on the number of bytes that can be allocated for POSIX message queues for the real user ID of the calling process.
pub const NICE: Self
[src]
This specifies a ceiling
to which the process's nice value can be raised
using setpriority(2)
or nice(2)
.
pub const NOFILE: Self
[src]
This specifies a value one greater than the maximum file descriptor number that can be opened by this process.
pub const NPROC: Self
[src]
A limit on the number of extant process (or, more precisely on Linux, threads) for the real user ID of the calling process.
pub const RSS: Self
[src]
A limit (in bytes) on the process's resident set (the number of virtual pages resident in RAM).
pub const RTPRIO: Self
[src]
This specifies a ceiling on the real-time priority
that may be set for this process
using sched_setscheduler(2)
and sched_setparam(2)
.
pub const RTTIME: Self
[src]
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.
pub const SIGPENDING: Self
[src]
A limit on the number of signals that may be queued for the real user ID of the calling process.
pub const STACK: Self
[src]
The maximum size (in bytes) of the process stack.
impl Resource
[src]
pub fn set(self, soft: Rlim, hard: Rlim) -> Result<()>
[src]
pub fn get(self) -> Result<(Rlim, Rlim)>
[src]
#[must_use]pub fn as_name(self) -> &'static str
[src]
#[must_use]pub const fn available_names() -> &'static [&'static str]
[src]
Returns available resource names.
#[must_use]pub const fn available_resources() -> &'static [Self]
[src]
Returns available resources.
#[must_use]pub const fn as_raw(self) -> RawResource
[src]
Returns the raw resource type.
Be careful: The actual type of RawResource
can be different on different platforms.
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]
impl Hash for Resource
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Resource> for Resource
[src]
impl StructuralEq for Resource
[src]
impl StructuralPartialEq for Resource
[src]
Auto Trait Implementations
impl RefUnwindSafe for Resource
impl Send for Resource
impl Sync for Resource
impl Unpin for Resource
impl UnwindSafe for Resource
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,