pub enum NodeContent {
Show 13 variants
Heading {
level: u8,
text: String,
},
Paragraph {
text: String,
},
List {
ordered: bool,
},
ListItem {
text: String,
},
Table {
grid: TableGrid,
},
Image {
description: Option<String>,
src: Option<String>,
image_index: Option<u32>,
},
Code {
text: String,
language: Option<String>,
},
Quote,
DefinitionList,
DefinitionItem {
term: String,
definition: String,
},
RawBlock {
format: String,
content: String,
},
MetadataBlock {
entries: Vec<MetadataEntry>,
},
Group {
label: Option<String>,
heading_level: Option<u8>,
heading_text: Option<String>,
},
}Expand description
The semantic content type of a document node.
Uses internally tagged representation ("node_type": "heading") for JSON serialization.
Variants§
Heading
A heading element (h1-h6).
Paragraph
A paragraph of text.
List
A list container (ordered or unordered). Children are ListItem nodes.
ListItem
A single list item.
Table
A table with structured cell data.
Image
An image element.
Fields
Code
A code block or inline code.
Fields
Quote
A block quote container.
DefinitionList
A definition list container.
DefinitionItem
A definition list entry with term and description.
RawBlock
A raw block preserved as-is (e.g. <script>, <style> content).
Fields
MetadataBlock
A block of key-value metadata pairs (from <head> meta tags).
Fields
§
entries: Vec<MetadataEntry>Key-value metadata pairs.
Group
A section grouping container (auto-generated from heading hierarchy).
Trait Implementations§
Source§impl Clone for NodeContent
impl Clone for NodeContent
Source§fn clone(&self) -> NodeContent
fn clone(&self) -> NodeContent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NodeContent
impl Debug for NodeContent
Source§impl Default for NodeContent
impl Default for NodeContent
impl Eq for NodeContent
Source§impl PartialEq for NodeContent
impl PartialEq for NodeContent
Source§fn eq(&self, other: &NodeContent) -> bool
fn eq(&self, other: &NodeContent) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for NodeContent
Auto Trait Implementations§
impl Freeze for NodeContent
impl RefUnwindSafe for NodeContent
impl Send for NodeContent
impl Sync for NodeContent
impl Unpin for NodeContent
impl UnsafeUnpin for NodeContent
impl UnwindSafe for NodeContent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.