pub struct Limits {
pub wall_timeout: Duration,
pub max_response_bytes: u32,
pub max_stderr_bytes: u64,
pub address_space_bytes: u64,
pub cpu_seconds: u64,
pub file_size_bytes: u64,
pub max_processes: u64,
}Expand description
Resource and output limits for one adapter class.
Fields§
§wall_timeout: DurationWall-clock ceiling enforced by the parent.
max_response_bytes: u32Ceiling on the response frame payload, checked against the declared length before allocation.
max_stderr_bytes: u64Ceiling on stderr bytes, drained and counted concurrently.
address_space_bytes: u64RLIMIT_AS for the child, in bytes.
cpu_seconds: u64RLIMIT_CPU for the child, in seconds.
file_size_bytes: u64RLIMIT_FSIZE for the child, in bytes. Caps regular-file growth inside the jail. Stdout is a pipe, so the response cap above is enforced by the parent instead.
max_processes: u64RLIMIT_NPROC for the child. An absolute cap on the process and thread count of the mapped real user id, so a compromised adapter cannot fork-bomb the host. The default is a modest absolute value: the shipped adapter spawns nothing, so on a host where the user already runs more tasks than the cap, every fork from the adapter fails, which is the intent.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Limits
impl RefUnwindSafe for Limits
impl Send for Limits
impl Sync for Limits
impl Unpin for Limits
impl UnsafeUnpin for Limits
impl UnwindSafe for Limits
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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