pub struct MemoryLimits {
pub max_variable_count: usize,
pub max_total_variable_bytes: usize,
pub max_array_entries: usize,
pub max_function_count: usize,
pub max_function_body_bytes: usize,
}Expand description
Memory limits for a Bash instance.
Controls the maximum amount of interpreter-level memory (variables, arrays, functions) a single instance can consume.
Fields§
§max_variable_count: usizeMaximum number of scalar variables.
max_total_variable_bytes: usizeMaximum total bytes across all variable keys + values.
max_array_entries: usizeMaximum total entries across all indexed and associative arrays.
max_function_count: usizeMaximum number of function definitions.
max_function_body_bytes: usizeMaximum total bytes of function body source text.
Implementations§
Source§impl MemoryLimits
impl MemoryLimits
Sourcepub fn max_variable_count(self, count: usize) -> Self
pub fn max_variable_count(self, count: usize) -> Self
Set maximum variable count.
Sourcepub fn max_total_variable_bytes(self, bytes: usize) -> Self
pub fn max_total_variable_bytes(self, bytes: usize) -> Self
Set maximum total variable bytes.
Sourcepub fn max_array_entries(self, count: usize) -> Self
pub fn max_array_entries(self, count: usize) -> Self
Set maximum array entries.
Sourcepub fn max_function_count(self, count: usize) -> Self
pub fn max_function_count(self, count: usize) -> Self
Set maximum function count.
Sourcepub fn max_function_body_bytes(self, bytes: usize) -> Self
pub fn max_function_body_bytes(self, bytes: usize) -> Self
Set maximum function body bytes.
Trait Implementations§
Source§impl Clone for MemoryLimits
impl Clone for MemoryLimits
Source§fn clone(&self) -> MemoryLimits
fn clone(&self) -> MemoryLimits
Returns a duplicate of the value. Read more
1.0.0 · 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 MemoryLimits
impl Debug for MemoryLimits
Auto Trait Implementations§
impl Freeze for MemoryLimits
impl RefUnwindSafe for MemoryLimits
impl Send for MemoryLimits
impl Sync for MemoryLimits
impl Unpin for MemoryLimits
impl UnsafeUnpin for MemoryLimits
impl UnwindSafe for MemoryLimits
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