Skip to main content

inline_segments_view

Function inline_segments_view 

Source
pub fn inline_segments_view(
    plain_text: &str,
    runs: &[FormatRun],
    images: &[ImageAnchor],
) -> Vec<InlineSegment>
Expand description

Synthesize a Vec<InlineSegment> view of a block from its plain_text, format_runs, and block_images. Returns segments in document order: a Text segment per format run (with a fallback default-format segment for any uncovered bytes), and an Image segment per anchor at its byte offset.

The canonical reader-side accessor for per-segment data — there is no persistent inline-element table; this view is computed fresh each call.