pub struct RuntimeOptions {
pub cursor_style: CursorStyle,
pub cursor_blink: bool,
pub scrollback_lines: u32,
pub tab_width: u8,
pub convert_eol: bool,
pub screen_reader_mode: bool,
pub bracketed_paste: bool,
pub minimum_contrast_ratio_x100: u16,
pub renderer: RendererType,
pub theme: ThemePalette,
}Expand description
The complete, validated runtime option state.
Construct with RuntimeOptions::default (safe defaults) and mutate via
RuntimeOptions::apply_patch. Direct field assignment is allowed for
host-side initialisation but bypasses validation — prefer the patch API for
any host-driven mutation.
Fields§
§cursor_style: CursorStyleCursor presentation style.
cursor_blink: boolWhether the cursor blinks.
scrollback_lines: u32Scrollback retention in lines (0 = no scrollback).
tab_width: u8Tab stop width in columns (1..=16).
convert_eol: boolWhether bare LF is treated as CRLF on output (convertEol).
screen_reader_mode: boolWhether screen-reader assistive output mode is active.
bracketed_paste: boolWhether bracketed paste is enabled.
minimum_contrast_ratio_x100: u16Minimum enforced foreground/background contrast ratio, ×100
(100..=2100). 100 (1.0:1) disables enforcement.
renderer: RendererTypeActive rendering backend.
theme: ThemePaletteTheme palette.
Implementations§
Source§impl RuntimeOptions
impl RuntimeOptions
Sourcepub fn apply_patch(
&mut self,
patch: &RuntimeOptionPatch,
caps: &OptionCapabilityProfile,
correlation_id: &str,
) -> RuntimeOptionUpdate
pub fn apply_patch( &mut self, patch: &RuntimeOptionPatch, caps: &OptionCapabilityProfile, correlation_id: &str, ) -> RuntimeOptionUpdate
Apply a (sparse) patch atomically against the given capability profile.
Returns a RuntimeOptionUpdate describing the outcome. On any
validation or gating failure the update is rejected, every offending
field’s error is reported, and self is left unchanged. On success the
patch is committed atomically and the changed fields plus required
renderer/engine synchronisation are reported.
correlation_id is recorded for structured-log triage only; it does not
affect the decision.
Sourcepub fn validate(
&self,
caps: &OptionCapabilityProfile,
) -> Vec<RuntimeOptionError>
pub fn validate( &self, caps: &OptionCapabilityProfile, ) -> Vec<RuntimeOptionError>
Validate this option state against a capability profile, returning every violation. An empty vector means fully valid and supported.
Sourcepub fn web_dataset(&self) -> [(&'static str, String); 3]
pub fn web_dataset(&self) -> [(&'static str, String); 3]
Stable, ordered CSS data-attribute pairs for the browser host. Mirrors
the accessibility surface’s web_dataset() convention so generated DOM
markup is byte-for-byte reproducible.