pub enum DocNode {
Header {
level: u8,
text: String,
},
Para {
text: String,
importance: f32,
},
Table {
headers: Vec<String>,
rows: Vec<Vec<String>>,
},
Code {
lang: Option<String>,
body: String,
},
List {
ordered: bool,
items: Vec<String>,
},
Metadata {
key: String,
value: String,
},
}Expand description
A semantic unit that makes up a document.
Produced by the parser and consumed by the renderer, compressor, and symbolizer.
Variants§
Header
Heading (H1–H6).
Para
Regular paragraph.
Fields
Table
Table.
Code
Code block.
List
List (ordered or unordered).
Metadata
Key-value metadata (title, summary, keywords, etc.).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DocNode
impl RefUnwindSafe for DocNode
impl Send for DocNode
impl Sync for DocNode
impl Unpin for DocNode
impl UnsafeUnpin for DocNode
impl UnwindSafe for DocNode
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