pub enum Node {
Heading {
level: u8,
text: String,
},
Paragraph {
text: String,
},
ListItem {
ordered: bool,
number: u64,
first_in_list: bool,
text: String,
level: u8,
},
Code {
language: Option<String>,
text: String,
},
Table(Table),
Picture {
caption: Option<String>,
image: Option<PictureImage>,
},
Group {
label: String,
children: Vec<Node>,
},
}Expand description
A single piece of document content.
Variants§
Heading
A heading. level is 1-6.
Paragraph
A run of body text.
ListItem
A single list item at the given nesting level (0 = top). For ordered
items, number is the display number (honoring the list’s start); it
is unused for unordered items. first_in_list marks the first item of a
list so the serializer can blank-line-separate adjacent sibling lists.
Code
A fenced code block.
Table(Table)
A table. The first row is treated as the header.
Picture
A picture/figure, with an optional caption and (when a backend extracts it) the embedded image itself.
Group
A logical grouping of child nodes (e.g. a list, a section).
Trait Implementations§
impl StructuralPartialEq for Node
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnsafeUnpin for Node
impl UnwindSafe for Node
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