pub struct BridgeOptions {
pub code_block_background: [f32; 4],
pub code_block_foreground: Option<[f32; 4]>,
pub echo_char: Option<char>,
}Expand description
Per-call knobs threaded through the conversion functions so that a host widget can override defaults driven by its active theme.
Default values reproduce the historical pre-themed behaviour: a light-grey card behind fenced code blocks and no foreground override for monospaced runs.
Fields§
§code_block_background: [f32; 4]Background painted behind blocks where BlockFormat.is_code_block == Some(true) AND the block carries no explicit
background_color. Has no effect on prose blocks or blocks that
set their own background.
code_block_foreground: Option<[f32; 4]>Foreground used for character runs whose font family resolves
to monospace (set by the markdown importer for inline code
spans and by is_code_block blocks). None keeps the
engine-level default text colour. Only applied when the run
carries no explicit foreground_color.
echo_char: Option<char>When Some(c), every character of every block laid out with
these options is replaced with c — one echo char per source
char — before shaping. This is the password / secure-field
masking path: the real text never reaches the shaper or the
glyph atlas, only the echo character does. Emitting one echo per
source char (not per grapheme) preserves char counts, so the
engine’s char-indexed caret / selection / hit-test stay aligned
with the host document’s positions. None (default) lays text
out verbatim.
Trait Implementations§
Source§impl Clone for BridgeOptions
impl Clone for BridgeOptions
Source§fn clone(&self) -> BridgeOptions
fn clone(&self) -> BridgeOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more