pub enum IndexNode {
Heading {
level: u8,
text: String,
},
Paragraph(String),
Link(Link),
List {
ordered: bool,
items: Vec<String>,
},
CodeBlock {
language: Option<String>,
code: String,
},
Table {
rows: Vec<Vec<String>>,
},
Spacer {
lines: u8,
},
Section {
role: SectionRole,
title: Option<String>,
collapsed: bool,
nodes: Vec<IndexNode>,
},
Image {
alt: String,
src: Option<String>,
},
Form(Form),
Error(String),
}Expand description
A semantic terminal-native node.
Variants§
Heading
Heading with one-based level.
Paragraph(String)
Paragraph text.
Link(Link)
Link with stable display address.
List
Ordered or unordered list.
Fields
CodeBlock
Code block.
Table
Table represented as rows of cells.
Spacer
Vertical rhythm hint derived from semantic block boundaries or bounded CSS spacing.
Section
Semantic page region, usually collapsed when it is secondary to the main content.
Fields
§
role: SectionRoleRegion role inferred from HTML landmarks or common page conventions.
Image
Image proxy. The renderer decides how to display it.
Form(Form)
Web form represented as terminal action fields.
Error(String)
Recoverable error displayed to the user.
Trait Implementations§
impl Eq for IndexNode
impl StructuralPartialEq for IndexNode
Auto Trait Implementations§
impl Freeze for IndexNode
impl RefUnwindSafe for IndexNode
impl Send for IndexNode
impl Sync for IndexNode
impl Unpin for IndexNode
impl UnsafeUnpin for IndexNode
impl UnwindSafe for IndexNode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more