pub struct OutputLimitConfig { /* private fields */ }Expand description
Configurable output size limit.
Threaded through KernelConfig → ExecContext → kernel pipeline execution.
Runtime-mutable via the kaish-output-limit builtin.
Implementations§
Source§impl OutputLimitConfig
impl OutputLimitConfig
Sourcepub fn default_limit() -> usize
pub fn default_limit() -> usize
Default limit used by on subcommand and set -o output-limit.
Sourcepub fn in_memory(self) -> Self
pub fn in_memory(self) -> Self
Switch to in-memory truncation — no disk spill, no host filesystem
writes. For runtime read-only kernels (e.g. kaibo). Builder form of
set_spill_mode.
Note: a NoLocal VFS mount forces this mode automatically at kernel
construction, so an embedder only needs this for a localfs-mounted
kernel it nonetheless wants to keep off the host disk.
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Whether output limiting is enabled.
Sourcepub fn spill_mode(&self) -> SpillMode
pub fn spill_mode(&self) -> SpillMode
The spill mode (disk vs in-memory truncation).
Sourcepub fn set_spill_mode(&mut self, mode: SpillMode)
pub fn set_spill_mode(&mut self, mode: SpillMode)
Set the spill mode.
Sourcepub fn head_bytes(&self) -> usize
pub fn head_bytes(&self) -> usize
Bytes of output head to preserve in truncated result.
Sourcepub fn tail_bytes(&self) -> usize
pub fn tail_bytes(&self) -> usize
Bytes of output tail to preserve in truncated result.
Sourcepub fn set_head_bytes(&mut self, bytes: usize)
pub fn set_head_bytes(&mut self, bytes: usize)
Set the head preview size.
Sourcepub fn set_tail_bytes(&mut self, bytes: usize)
pub fn set_tail_bytes(&mut self, bytes: usize)
Set the tail preview size.
Trait Implementations§
Source§impl Clone for OutputLimitConfig
impl Clone for OutputLimitConfig
Source§fn clone(&self) -> OutputLimitConfig
fn clone(&self) -> OutputLimitConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more