Skip to main content

ProgramConfig

Struct ProgramConfig 

Source
pub struct ProgramConfig {
Show 21 fields pub screen_mode: ScreenMode, pub ui_anchor: UiAnchor, pub budget: FrameBudgetConfig, pub diff_config: RuntimeDiffConfig, pub evidence_sink: EvidenceSinkConfig, pub render_trace: RenderTraceConfig, pub frame_timing: Option<FrameTimingConfig>, pub conformal_config: Option<ConformalConfig>, pub locale_context: LocaleContext, pub poll_timeout: Duration, pub resize_coalescer: CoalescerConfig, pub resize_behavior: ResizeBehavior, pub forced_size: Option<(u16, u16)>, pub mouse_capture_policy: MouseCapturePolicy, pub bracketed_paste: bool, pub focus_reporting: bool, pub kitty_keyboard: bool, pub persistence: PersistenceConfig, pub inline_auto_remeasure: Option<InlineAutoRemeasureConfig>, pub widget_refresh: WidgetRefreshConfig, pub effect_queue: EffectQueueConfig,
}
Expand description

Configuration for the program runtime.

Fields§

§screen_mode: ScreenMode

Screen mode (inline or alternate screen).

§ui_anchor: UiAnchor

UI anchor for inline mode.

§budget: FrameBudgetConfig

Frame budget configuration.

§diff_config: RuntimeDiffConfig

Diff strategy configuration for the terminal writer.

§evidence_sink: EvidenceSinkConfig

Evidence JSONL sink configuration.

§render_trace: RenderTraceConfig

Render-trace recorder configuration.

§frame_timing: Option<FrameTimingConfig>

Optional frame timing sink.

§conformal_config: Option<ConformalConfig>

Conformal predictor configuration for frame-time risk gating.

§locale_context: LocaleContext

Locale context used for rendering.

§poll_timeout: Duration

Input poll timeout.

§resize_coalescer: CoalescerConfig

Resize coalescer configuration.

§resize_behavior: ResizeBehavior

Resize handling behavior (immediate/throttled).

§forced_size: Option<(u16, u16)>

Forced terminal size override (when set, resize events are ignored).

§mouse_capture_policy: MouseCapturePolicy

Mouse capture policy (Auto, On, Off).

Auto is inline-safe: off in inline modes, on in alt-screen mode.

§bracketed_paste: bool

Enable bracketed paste.

§focus_reporting: bool

Enable focus reporting.

§kitty_keyboard: bool

Enable Kitty keyboard protocol (repeat/release events).

§persistence: PersistenceConfig

State persistence configuration.

§inline_auto_remeasure: Option<InlineAutoRemeasureConfig>

Inline auto UI height remeasurement policy.

§widget_refresh: WidgetRefreshConfig

Widget refresh selection configuration.

§effect_queue: EffectQueueConfig

Effect queue scheduling configuration.

Implementations§

Source§

impl ProgramConfig

Source

pub fn fullscreen() -> Self

Create config for fullscreen applications.

Source

pub fn inline(height: u16) -> Self

Create config for inline mode with specified height.

Source

pub fn inline_auto(min_height: u16, max_height: u16) -> Self

Create config for inline mode with automatic UI height.

Source

pub fn with_mouse(self) -> Self

Enable mouse support.

Source

pub fn with_mouse_capture_policy(self, policy: MouseCapturePolicy) -> Self

Set mouse capture policy.

Source

pub fn with_mouse_enabled(self, enabled: bool) -> Self

Force mouse capture enabled/disabled regardless of screen mode.

Source

pub const fn resolved_mouse_capture(&self) -> bool

Resolve mouse capture using the configured policy and screen mode.

Source

pub fn with_budget(self, budget: FrameBudgetConfig) -> Self

Set the budget configuration.

Source

pub fn with_diff_config(self, diff_config: RuntimeDiffConfig) -> Self

Set the diff strategy configuration for the terminal writer.

Source

pub fn with_evidence_sink(self, config: EvidenceSinkConfig) -> Self

Set the evidence JSONL sink configuration.

Source

pub fn with_render_trace(self, config: RenderTraceConfig) -> Self

Set the render-trace recorder configuration.

Source

pub fn with_frame_timing(self, config: FrameTimingConfig) -> Self

Set a frame timing sink for per-frame profiling.

Source

pub fn with_conformal_config(self, config: ConformalConfig) -> Self

Enable conformal frame-time risk gating with the given config.

Source

pub fn without_conformal(self) -> Self

Disable conformal frame-time risk gating.

Source

pub fn with_locale_context(self, locale_context: LocaleContext) -> Self

Set the locale context used for rendering.

Source

pub fn with_locale(self, locale: impl Into<Locale>) -> Self

Set the base locale used for rendering.

Source

pub fn with_widget_refresh(self, config: WidgetRefreshConfig) -> Self

Set the widget refresh selection configuration.

Source

pub fn with_effect_queue(self, config: EffectQueueConfig) -> Self

Set the effect queue scheduling configuration.

Source

pub fn with_resize_coalescer(self, config: CoalescerConfig) -> Self

Set the resize coalescer configuration.

Source

pub fn with_resize_behavior(self, behavior: ResizeBehavior) -> Self

Set the resize handling behavior.

Source

pub fn with_forced_size(self, width: u16, height: u16) -> Self

Force a fixed terminal size (cols, rows). Resize events are ignored.

Source

pub fn without_forced_size(self) -> Self

Clear any forced terminal size override.

Source

pub fn with_legacy_resize(self, enabled: bool) -> Self

Toggle legacy immediate-resize behavior for migration.

Source

pub fn with_persistence(self, persistence: PersistenceConfig) -> Self

Set the persistence configuration.

Source

pub fn with_registry(self, registry: Arc<StateRegistry>) -> Self

Enable persistence with the given registry.

Source

pub fn with_inline_auto_remeasure( self, config: InlineAutoRemeasureConfig, ) -> Self

Enable inline auto UI height remeasurement with the given policy.

Source

pub fn without_inline_auto_remeasure(self) -> Self

Disable inline auto UI height remeasurement.

Trait Implementations§

Source§

impl Clone for ProgramConfig

Source§

fn clone(&self) -> ProgramConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ProgramConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ProgramConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more