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 moreAuto Trait Implementations§
impl Freeze for OutputLimitConfig
impl RefUnwindSafe for OutputLimitConfig
impl Send for OutputLimitConfig
impl Sync for OutputLimitConfig
impl Unpin for OutputLimitConfig
impl UnsafeUnpin for OutputLimitConfig
impl UnwindSafe for OutputLimitConfig
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> ⓘ
impl<T> OrderedSeq<'_, T> for Twhere
T: Clone,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
Source§impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
Source§fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
WrappingSpan::make_wrapped to wrap an AST node in a span.