Struct Limits

Source
pub struct Limits {
Show 16 fields pub max_cpu_time: Limit<Duration>, pub max_file_size: Limit<u64>, pub max_data_size: Limit<usize>, pub max_stack_size: Limit<usize>, pub max_core_file_size: Limit<usize>, pub max_resident_set: Limit<usize>, pub max_processes: Limit<usize>, pub max_open_files: Limit<usize>, pub max_locked_memory: Limit<usize>, pub max_address_space: Limit<usize>, pub max_file_locks: Limit<usize>, pub max_pending_signals: Limit<usize>, pub max_msgqueue_size: Limit<usize>, pub max_nice_priority: Limit<usize>, pub max_realtime_priority: Limit<usize>, pub max_realtime_timeout: Limit<Duration>,
}
Expand description

Process limits information See man 2 getrlimit.

Fields§

§max_cpu_time: Limit<Duration>

The maximum CPU time a process can use.

§max_file_size: Limit<u64>

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

§max_data_size: Limit<usize>

The maximum size of the process’s data segment in bytes.

§max_stack_size: Limit<usize>

The maximum size of the process stack in bytes.

§max_core_file_size: Limit<usize>

Maximum size of a core file in bytes.

§max_resident_set: Limit<usize>

Specifies the limit of the process’s resident set in bytes.

§max_processes: Limit<usize>

The maximum number of processes (or, more precisely on Linux, threads) that can be created for the real user ID of the calling process.

§max_open_files: Limit<usize>

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

§max_locked_memory: Limit<usize>

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

§max_address_space: Limit<usize>

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

§max_file_locks: Limit<usize>

A limit on the combined number of locks and leases that this process may establish.

§max_pending_signals: Limit<usize>

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

§max_msgqueue_size: Limit<usize>

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

§max_nice_priority: Limit<usize>

Specifies a ceiling to which the process’s nice value can be raised.

§max_realtime_priority: Limit<usize>

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

§max_realtime_timeout: Limit<Duration>

Specifies a ceiling on the real-time priority that may be set for this process.

Trait Implementations§

Source§

impl Clone for Limits

Source§

fn clone(&self) -> Limits

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Limits

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for Limits

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

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

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Limits

Source§

fn eq(&self, other: &Limits) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Limits

Source§

impl Eq for Limits

Source§

impl StructuralPartialEq for Limits

Auto Trait Implementations§

§

impl Freeze for Limits

§

impl RefUnwindSafe for Limits

§

impl Send for Limits

§

impl Sync for Limits

§

impl Unpin for Limits

§

impl UnwindSafe for Limits

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.