pub struct SourcePreviewResponse {
pub frame_id: FrameId,
pub source_file: String,
pub target_line: u32,
pub target_col: Option<u32>,
pub total_lines: u32,
pub html: String,
pub context_lines: Option<Vec<SourceContextLine>>,
pub compact_context_lines: Option<Vec<SourceContextLine>>,
pub context_line: Option<String>,
pub frame_header: Option<String>,
}Expand description
Response for GET /api/source/preview.
Fields§
§frame_id: FrameId§source_file: String§target_line: u32§target_col: Option<u32>§total_lines: u32§html: StringFull arborium-highlighted HTML for the entire file. The frontend splits this into per-line strings using splitHighlightedHtml.
context_lines: Option<Vec<SourceContextLine>>Highlighted, collapsed context lines for the cut scope excerpt. Separators replace elided regions; line numbers are original file line numbers.
compact_context_lines: Option<Vec<SourceContextLine>>Highlighted, collapsed context lines for the aggressively cut scope excerpt. Intended for compact/collapsed displays.
context_line: Option<String>Highlighted HTML for a compact target-statement snippet.
Preserves statement structure (may include newlines) and aggressively elides long inner block bodies with a placeholder. Used for compact collapsed-frame display.
frame_header: Option<String>Highlighted HTML for the frame header — the label identifying which function or method this frame belongs to.
Format: fn name(params...) for free functions,
Type::fn name(params...) for impl methods (module path included when present).
Visibility modifiers are omitted. Currently only populated for Rust.