pub struct BlockSnapshot {
pub block_id: usize,
pub position: usize,
pub length: usize,
pub text: String,
pub fragments: Vec<FragmentContent>,
pub block_format: BlockFormat,
pub list_info: Option<ListInfo>,
pub parent_frame_id: Option<usize>,
pub table_cell: Option<TableCellContext>,
pub paint_highlights: Vec<PaintHighlightSpan>,
}Expand description
All layout-relevant data for one block, captured atomically.
Fields§
§block_id: usize§position: usize§length: usize§text: String§fragments: Vec<FragmentContent>§block_format: BlockFormat§list_info: Option<ListInfo>§parent_frame_id: Option<usize>Parent frame ID. Needed to know where this block lives in the frame tree (e.g. main frame vs. a sub-frame or table cell frame).
table_cell: Option<TableCellContext>If this block is inside a table cell, the cell coordinates. Needed so the typesetter can propagate height changes to the enclosing table row.
paint_highlights: Vec<PaintHighlightSpan>Paint-only highlight overlay for this block.
Non-empty only when the active syntax highlighter is paint-only
(colors / underline decorations, no metric changes). In that case
fragments carry the base formatting (no highlight merge) and the
layout engine applies these spans as a post-shape recolor — no
reshaping. When a metric-affecting highlighter is active, highlights
are merged into fragments as usual and this is empty.
Trait Implementations§
Source§impl Clone for BlockSnapshot
impl Clone for BlockSnapshot
Source§fn clone(&self) -> BlockSnapshot
fn clone(&self) -> BlockSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BlockSnapshot
impl Debug for BlockSnapshot
Source§impl PartialEq for BlockSnapshot
impl PartialEq for BlockSnapshot
Source§fn eq(&self, other: &BlockSnapshot) -> bool
fn eq(&self, other: &BlockSnapshot) -> bool
self and other values to be equal, and is used by ==.