Skip to main content

euv_docs/model/
enum.rs

1use super::*;
2
3/// Structured content block extracted from a Markdown documentation file.
4#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
5pub enum DocBlock {
6    /// Section heading with level (1..=6), anchor slug, and text.
7    Heading {
8        /// Heading depth from 1 to 6.
9        level: u8,
10        /// URL anchor slug.
11        slug: String,
12        /// Visible heading text.
13        text: String,
14    },
15    /// Plain paragraph text.
16    Paragraph(String),
17    /// Fenced or indented code block with optional language tag.
18    Code {
19        /// Language identifier (for example `rust` or `shell`).
20        language: String,
21        /// Source code text.
22        code: String,
23    },
24    /// Unordered or ordered list item text.
25    ListItem(String),
26    /// Blockquote or callout note paragraph text.
27    BlockQuote(String),
28    /// GitHub-Flavored Markdown table with header cells and body rows.
29    Table {
30        /// Column header labels.
31        headers: Vec<String>,
32        /// Table body rows aligned with `headers`.
33        rows: Vec<Vec<String>>,
34    },
35    /// Embedded image with alt text and source URL.
36    Image {
37        /// Image alternative text description.
38        alt: String,
39        /// Image source URL or relative asset path.
40        src: String,
41    },
42    /// Thematic horizontal section divider (`---`).
43    HorizontalRule,
44}