pub enum Block {
Show 14 variants
Heading {
level: u8,
title: Title,
tags: Vec<Tag>,
children: Vec<Block>,
},
Paragraph {
inlines: Vec<Inline>,
},
SrcBlock {
language: String,
content: String,
},
ExampleBlock {
content: String,
},
QuoteBlock {
children: Vec<Block>,
},
List {
list_type: ListType,
items: Vec<ListItem>,
},
Table {
rows: Vec<Vec<TableCell>>,
},
PropertyDrawer {
entries: Vec<(String, String)>,
},
LogbookDrawer {
entries: Vec<LogEntry>,
},
Planning {
entries: Vec<PlanningEntry>,
},
Comment {
text: String,
},
Keyword {
name: String,
value: String,
},
BlankLine,
HorizontalRule,
}Expand description
Block-level structural elements.
Every node kind in the org structural vocabulary is enumerated as its own constructor (ADR-003). Drawers and planning lines are top-level blocks.
Variants§
Heading
Heading level title tags children
Paragraph
SrcBlock
SrcBlock language content
ExampleBlock
#+begin_example … #+end_example literal example block.
QuoteBlock
List
Table
PropertyDrawer
LogbookDrawer
Planning
Fields
§
entries: Vec<PlanningEntry>Comment
Keyword
A #+NAME: value keyword line (e.g. #+title:, #+filetags:).
name is the keyword identifier; value is the verbatim remainder
after the : — leading space included — so the line round-trips
byte-for-byte.
BlankLine
A single empty source line. Blank lines are represented explicitly so document spacing round-trips faithfully.
HorizontalRule
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Block
impl<'de> Deserialize<'de> for Block
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 Eq for Block
impl StructuralPartialEq for Block
Auto Trait Implementations§
impl Freeze for Block
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnsafeUnpin for Block
impl UnwindSafe for Block
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