pub struct RlimitConfig {
pub max_open_files: Option<u64>,
pub max_file_size_bytes: Option<u64>,
pub disable_core_dumps: bool,
}Expand description
Declarative rlimit-based config.
Fields§
§max_open_files: Option<u64>Maximum number of open file descriptors (RLIMIT_NOFILE).
Typical values:
Some(1024)for “normal” processesSome(4096)/8192for IO-heavy tasksNoneleaves the OS / parent limits unchanged.
max_file_size_bytes: Option<u64>Maximum size of created files in bytes (RLIMIT_FSIZE).
When the process attempts to grow a file beyond this limit, the kernel typically delivers SIGXFSZ and the process terminates.
None leaves the OS / parent limits unchanged.
disable_core_dumps: boolDisable core dumps (RLIMIT_CORE = 0) when set to true.
This prevents large core files from being written for failing tasks.
When false, the OS default / inherited core limit is preserved.
Implementations§
Trait Implementations§
Source§impl Clone for RlimitConfig
impl Clone for RlimitConfig
Source§fn clone(&self) -> RlimitConfig
fn clone(&self) -> RlimitConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RlimitConfig
impl Debug for RlimitConfig
Source§impl Default for RlimitConfig
impl Default for RlimitConfig
Source§fn default() -> RlimitConfig
fn default() -> RlimitConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RlimitConfig
impl RefUnwindSafe for RlimitConfig
impl Send for RlimitConfig
impl Sync for RlimitConfig
impl Unpin for RlimitConfig
impl UnsafeUnpin for RlimitConfig
impl UnwindSafe for RlimitConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more