pub struct ProcLimits {
pub mem_bytes: u64,
pub cpu_secs: Option<u64>,
pub nofile: u64,
pub fsize_bytes: u64,
}Expand description
Resource limits applied with setrlimit in the child.
Fields§
§mem_bytes: u64Address-space cap (RLIMIT_AS) in bytes. Enforced on Linux; macOS
does not implement it, so there it is best effort.
cpu_secs: Option<u64>CPU seconds (RLIMIT_CPU), for bounded runs.
nofile: u64Open files (RLIMIT_NOFILE).
fsize_bytes: u64Largest file the process may write (RLIMIT_FSIZE).
Implementations§
Source§impl ProcLimits
impl ProcLimits
Sourcepub fn for_ram_mb(ram_mb: u32) -> Self
pub fn for_ram_mb(ram_mb: u32) -> Self
Limits for a cog with ram_mb memory.
Trait Implementations§
Source§impl Clone for ProcLimits
impl Clone for ProcLimits
impl Copy for ProcLimits
Source§impl Debug for ProcLimits
impl Debug for ProcLimits
impl Eq for ProcLimits
Source§impl PartialEq for ProcLimits
impl PartialEq for ProcLimits
impl StructuralPartialEq for ProcLimits
Auto Trait Implementations§
impl Freeze for ProcLimits
impl RefUnwindSafe for ProcLimits
impl Send for ProcLimits
impl Sync for ProcLimits
impl Unpin for ProcLimits
impl UnsafeUnpin for ProcLimits
impl UnwindSafe for ProcLimits
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more