pub struct ProgramConfig {Show 28 fields
pub screen_mode: ScreenMode,
pub ui_anchor: UiAnchor,
pub budget: FrameBudgetConfig,
pub load_governor: LoadGovernorConfig,
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 immediate_drain: ImmediateDrainConfig,
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,
pub guardrails: GuardrailsConfig,
pub intercept_signals: bool,
pub tick_strategy: Option<TickStrategyKind>,
pub runtime_lane: RuntimeLane,
pub rollout_policy: RolloutPolicy,
}Expand description
Configuration for the program runtime.
Fields§
§screen_mode: ScreenModeScreen mode (inline or alternate screen).
ui_anchor: UiAnchorUI anchor for inline mode.
budget: FrameBudgetConfigFrame budget configuration.
load_governor: LoadGovernorConfigRuntime load-governor configuration.
diff_config: RuntimeDiffConfigDiff strategy configuration for the terminal writer.
evidence_sink: EvidenceSinkConfigEvidence JSONL sink configuration.
render_trace: RenderTraceConfigRender-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: LocaleContextLocale context used for rendering.
poll_timeout: DurationInput poll timeout.
immediate_drain: ImmediateDrainConfigImmediate event-drain policy for burst handling.
resize_coalescer: CoalescerConfigResize coalescer configuration.
resize_behavior: ResizeBehaviorResize handling behavior (immediate/throttled).
forced_size: Option<(u16, u16)>Forced terminal size override (when set, resize events are ignored).
mouse_capture_policy: MouseCapturePolicyMouse capture policy (Auto, On, Off).
Auto is inline-safe: off in inline modes, on in alt-screen mode.
bracketed_paste: boolEnable bracketed paste.
focus_reporting: boolEnable focus reporting.
kitty_keyboard: boolEnable Kitty keyboard protocol (repeat/release events).
persistence: PersistenceConfigState persistence configuration.
inline_auto_remeasure: Option<InlineAutoRemeasureConfig>Inline auto UI height remeasurement policy.
widget_refresh: WidgetRefreshConfigWidget refresh selection configuration.
effect_queue: EffectQueueConfigEffect queue scheduling configuration.
guardrails: GuardrailsConfigFrame guardrails configuration (memory + queue safety limits).
intercept_signals: boolInstall signal handlers for cleanup on SIGINT/SIGTERM/SIGHUP.
Defaults to true for application safety. Set to false in tests or
when the embedding application manages signals.
tick_strategy: Option<TickStrategyKind>Optional tick strategy for selective background screen ticking.
When None (default), all screens tick every frame (current behavior).
When set, the runtime consults the strategy for each inactive screen.
runtime_lane: RuntimeLaneRuntime execution lane for the Asupersync migration rollout.
Controls which subscription/effect backend is active.
Defaults to Structured (CancellationToken-backed, current migration state).
Logged at startup so operators can identify the active lane.
rollout_policy: RolloutPolicyRollout policy for the Asupersync migration (bd-2crbt).
Controls whether shadow-run comparison is active during this session.
When Shadow, both the baseline and candidate lanes run in parallel
and evidence is emitted; rendering uses the baseline lane only.
Implementations§
Source§impl ProgramConfig
impl ProgramConfig
Sourcepub fn fullscreen() -> Self
pub fn fullscreen() -> Self
Create config for fullscreen applications.
Sourcepub fn inline_auto(min_height: u16, max_height: u16) -> Self
pub fn inline_auto(min_height: u16, max_height: u16) -> Self
Create config for inline mode with automatic UI height.
Sourcepub fn with_mouse(self) -> Self
pub fn with_mouse(self) -> Self
Enable mouse support.
Sourcepub fn with_mouse_capture_policy(self, policy: MouseCapturePolicy) -> Self
pub fn with_mouse_capture_policy(self, policy: MouseCapturePolicy) -> Self
Set mouse capture policy.
Sourcepub fn with_mouse_enabled(self, enabled: bool) -> Self
pub fn with_mouse_enabled(self, enabled: bool) -> Self
Force mouse capture enabled/disabled regardless of screen mode.
Sourcepub const fn resolved_mouse_capture(&self) -> bool
pub const fn resolved_mouse_capture(&self) -> bool
Resolve mouse capture using the configured policy and screen mode.
Sourcepub fn with_budget(self, budget: FrameBudgetConfig) -> Self
pub fn with_budget(self, budget: FrameBudgetConfig) -> Self
Set the budget configuration.
Sourcepub fn with_load_governor(self, config: LoadGovernorConfig) -> Self
pub fn with_load_governor(self, config: LoadGovernorConfig) -> Self
Set the runtime load-governor configuration.
Sourcepub fn without_load_governor(self) -> Self
pub fn without_load_governor(self) -> Self
Disable the adaptive load governor and use legacy render-budget behavior.
Sourcepub fn with_diff_config(self, diff_config: RuntimeDiffConfig) -> Self
pub fn with_diff_config(self, diff_config: RuntimeDiffConfig) -> Self
Set the diff strategy configuration for the terminal writer.
Sourcepub fn with_evidence_sink(self, config: EvidenceSinkConfig) -> Self
pub fn with_evidence_sink(self, config: EvidenceSinkConfig) -> Self
Set the evidence JSONL sink configuration.
Sourcepub fn with_render_trace(self, config: RenderTraceConfig) -> Self
pub fn with_render_trace(self, config: RenderTraceConfig) -> Self
Set the render-trace recorder configuration.
Sourcepub fn with_frame_timing(self, config: FrameTimingConfig) -> Self
pub fn with_frame_timing(self, config: FrameTimingConfig) -> Self
Set a frame timing sink for per-frame profiling.
Sourcepub fn with_conformal_config(self, config: ConformalConfig) -> Self
pub fn with_conformal_config(self, config: ConformalConfig) -> Self
Enable conformal frame-time risk gating with the given config.
Sourcepub fn without_conformal(self) -> Self
pub fn without_conformal(self) -> Self
Disable conformal frame-time risk gating.
Sourcepub fn with_locale_context(self, locale_context: LocaleContext) -> Self
pub fn with_locale_context(self, locale_context: LocaleContext) -> Self
Set the locale context used for rendering.
Sourcepub fn with_locale(self, locale: impl Into<Locale>) -> Self
pub fn with_locale(self, locale: impl Into<Locale>) -> Self
Set the base locale used for rendering.
Sourcepub fn with_widget_refresh(self, config: WidgetRefreshConfig) -> Self
pub fn with_widget_refresh(self, config: WidgetRefreshConfig) -> Self
Set the widget refresh selection configuration.
Sourcepub fn with_effect_queue(self, config: EffectQueueConfig) -> Self
pub fn with_effect_queue(self, config: EffectQueueConfig) -> Self
Set the effect queue scheduling configuration.
Sourcepub fn with_resize_coalescer(self, config: CoalescerConfig) -> Self
pub fn with_resize_coalescer(self, config: CoalescerConfig) -> Self
Set the resize coalescer configuration.
Sourcepub fn with_resize_behavior(self, behavior: ResizeBehavior) -> Self
pub fn with_resize_behavior(self, behavior: ResizeBehavior) -> Self
Set the resize handling behavior.
Sourcepub fn with_forced_size(self, width: u16, height: u16) -> Self
pub fn with_forced_size(self, width: u16, height: u16) -> Self
Force a fixed terminal size (cols, rows). Resize events are ignored.
Sourcepub fn without_forced_size(self) -> Self
pub fn without_forced_size(self) -> Self
Clear any forced terminal size override.
Sourcepub fn with_legacy_resize(self, enabled: bool) -> Self
pub fn with_legacy_resize(self, enabled: bool) -> Self
Toggle legacy immediate-resize behavior for migration.
Sourcepub fn with_persistence(self, persistence: PersistenceConfig) -> Self
pub fn with_persistence(self, persistence: PersistenceConfig) -> Self
Set the persistence configuration.
Sourcepub fn with_registry(self, registry: Arc<StateRegistry>) -> Self
pub fn with_registry(self, registry: Arc<StateRegistry>) -> Self
Enable persistence with the given registry.
Sourcepub fn with_inline_auto_remeasure(
self,
config: InlineAutoRemeasureConfig,
) -> Self
pub fn with_inline_auto_remeasure( self, config: InlineAutoRemeasureConfig, ) -> Self
Enable inline auto UI height remeasurement with the given policy.
Sourcepub fn without_inline_auto_remeasure(self) -> Self
pub fn without_inline_auto_remeasure(self) -> Self
Disable inline auto UI height remeasurement.
Sourcepub fn with_signal_interception(self, enabled: bool) -> Self
pub fn with_signal_interception(self, enabled: bool) -> Self
Enable or disable signal interception (SIGHUP/SIGTERM/SIGINT) for cleanup.
Sourcepub fn with_guardrails(self, config: GuardrailsConfig) -> Self
pub fn with_guardrails(self, config: GuardrailsConfig) -> Self
Set frame guardrails configuration.
Sourcepub fn with_immediate_drain(self, config: ImmediateDrainConfig) -> Self
pub fn with_immediate_drain(self, config: ImmediateDrainConfig) -> Self
Set the immediate event-drain policy for burst handling.
Sourcepub fn with_tick_strategy(self, strategy: TickStrategyKind) -> Self
pub fn with_tick_strategy(self, strategy: TickStrategyKind) -> Self
Set the tick strategy for selective background screen ticking.
When set, the runtime consults the strategy to decide which inactive screens should tick on each frame. Without a strategy, all screens tick every frame (backwards-compatible default).
ProgramConfig::default()
.with_tick_strategy(TickStrategyKind::Uniform { divisor: 5 })Sourcepub fn with_lane(self, lane: RuntimeLane) -> Self
pub fn with_lane(self, lane: RuntimeLane) -> Self
Set the runtime execution lane.
Sourcepub fn with_rollout_policy(self, policy: RolloutPolicy) -> Self
pub fn with_rollout_policy(self, policy: RolloutPolicy) -> Self
Set the rollout policy for the Asupersync migration.
Sourcepub fn with_env_overrides(self) -> Self
pub fn with_env_overrides(self) -> Self
Apply environment-variable overrides for lane and rollout policy.
Reads FTUI_RUNTIME_LANE and FTUI_ROLLOUT_POLICY. Unset variables
are ignored. Unrecognized values emit a tracing::warn and are
ignored (the programmatic default or prior builder value is retained).
Trait Implementations§
Source§impl Clone for ProgramConfig
impl Clone for ProgramConfig
Source§fn clone(&self) -> ProgramConfig
fn clone(&self) -> ProgramConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more