Skip to main content

EuvMarkdownBlock

Enum EuvMarkdownBlock 

Source
pub enum EuvMarkdownBlock {
Show 14 variants Heading { level: u8, text: String, }, Paragraph(Vec<EuvMarkdownInline>), CodeBlock { language: String, title: Option<String>, highlight_lines: Vec<usize>, code: String, }, Mermaid { source: String, }, EChart { source: String, }, MathBlock(String), Quote { kind: EuvMarkdownAlertKind, title: Option<String>, depth: usize, lines: Vec<String>, children: Vec<EuvMarkdownBlock>, }, List { ordered: bool, start: usize, items: Vec<EuvMarkdownListItem>, }, Table { headers: Vec<String>, alignments: Vec<EuvMarkdownAlign>, rows: Vec<Vec<String>>, }, DefinitionList(Vec<EuvMarkdownDefItem>), Footnotes(Vec<EuvMarkdownFootnote>), Divider, Image { alt: String, url: String, }, Details { summary: String, open: bool, body: Vec<String>, children: Vec<EuvMarkdownBlock>, },
}
Expand description

Parsed block-level Markdown AST node rendered natively by EuvMarkdown.

Variants§

§

Heading

ATX heading (# through ######).

Fields

§level: u8

Heading level (1..=6).

§text: String

Heading text.

§

Paragraph(Vec<EuvMarkdownInline>)

Rich inline paragraph.

§

CodeBlock

Fenced or indented syntax-highlighted code block.

Fields

§language: String

Language identifier (e.g. "rust", "ts", "json").

§title: Option<String>

Optional code fence header title or filename (title="..." / filename="...").

§highlight_lines: Vec<usize>

Optional 1-based highlighted line numbers parsed from {1,3-5} fence markers.

§code: String

Raw code body.

§

Mermaid

Native vector Mermaid diagram block (```mermaid).

Fields

§source: String

Raw Mermaid diagram source text.

§

EChart

Embedded native vector ECharts block (```echart or ```echarts).

Fields

§source: String

Raw JSON or key-value ECharts specification text.

§

MathBlock(String)

Display math block ($$...$$).

§

Quote

Blockquote or GitHub-flavored Alert / container callout.

Fields

§kind: EuvMarkdownAlertKind

Plain quote or alert kind.

§title: Option<String>

Optional custom callout header title (for example from ::: warning Custom Title).

§depth: usize

Nesting depth (1 = top level).

§lines: Vec<String>

Raw content lines inside the callout.

§children: Vec<EuvMarkdownBlock>

Recursively parsed nested Markdown child blocks inside the callout.

§

List

Unordered, ordered, nested, or task-checklist list.

Fields

§ordered: bool

Whether items render with ordinal numbers.

§start: usize

Starting ordinal number for ordered lists (1 by default).

§items: Vec<EuvMarkdownListItem>

Ordered list items.

§

Table

GFM aligned data table.

Fields

§headers: Vec<String>

Column header labels.

§alignments: Vec<EuvMarkdownAlign>

Column alignments.

§rows: Vec<Vec<String>>

Body rows.

§

DefinitionList(Vec<EuvMarkdownDefItem>)

Extended Markdown definition list (Term + : Definition).

§

Footnotes(Vec<EuvMarkdownFootnote>)

Bottom footnote definitions section ([^id]: text).

§

Divider

Thematic horizontal divider (---).

§

Image

Image figure (![alt](url)).

Fields

§alt: String

Accessible caption / alt text.

§url: String

Image source URI or asset path.

§

Details

Collapsible <details><summary> or ::: details disclosure block.

Fields

§summary: String

Toggle summary header.

§open: bool

Whether the disclosure block starts expanded (<details open>).

§body: Vec<String>

Raw content lines revealed when expanded.

§children: Vec<EuvMarkdownBlock>

Recursively parsed nested Markdown child blocks revealed when expanded.

Trait Implementations§

Source§

impl Clone for EuvMarkdownBlock

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for EuvMarkdownBlock

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for EuvMarkdownBlock

Source§

impl PartialEq for EuvMarkdownBlock

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for EuvMarkdownBlock

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.