pub enum WdfBlock {
Paragraph {
content: Vec<WdfText>,
},
Heading {
attrs: HeadingAttrs,
content: Vec<WdfText>,
},
Blockquote {
content: Vec<WdfParagraph>,
},
BulletList {
content: Vec<WdfListItem>,
},
OrderedList {
attrs: Option<OrderedListAttrs>,
content: Vec<WdfListItem>,
},
}Expand description
A block-level node.
Serializes with the "type" tag used in WDF JSON, e.g.
{"type": "heading", "attrs": {"level": 2}, "content": [...]}.
Variants§
Paragraph
A paragraph of inline WdfText runs.
Heading
An ATX heading, level 1–6.
Blockquote
A quotation holding one or more paragraphs.
Fields
§
content: Vec<WdfParagraph>BulletList
An unordered list; every item holds exactly one paragraph.
Fields
§
content: Vec<WdfListItem>OrderedList
An ordered list; every item holds exactly one paragraph. Canonical
documents always carry attrs.start (defaulting to 1).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for WdfBlock
impl<'de> Deserialize<'de> for WdfBlock
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for WdfBlock
Auto Trait Implementations§
impl Freeze for WdfBlock
impl RefUnwindSafe for WdfBlock
impl Send for WdfBlock
impl Sync for WdfBlock
impl Unpin for WdfBlock
impl UnsafeUnpin for WdfBlock
impl UnwindSafe for WdfBlock
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