pub enum Block {
Heading {
level: u8,
content: Vec<Inline>,
},
Paragraph(Vec<Inline>),
CodeBlock {
language: Option<String>,
content: String,
},
Directive(Directive),
Attestation(Attestation),
ThematicBreak,
BlockQuote(Vec<Block>),
List {
ordered: bool,
items: Vec<Vec<Block>>,
},
}Expand description
A block-level element in an A2ML document.
Blocks are separated by blank lines in the source text.
Variants§
Heading
A heading with a depth (1 = #, 2 = ##, etc.) and inline content.
Fields
Paragraph(Vec<Inline>)
A paragraph of inline content.
CodeBlock
A fenced or indented code block with an optional language tag.
Fields
Directive(Directive)
A directive block (starts with @).
Attestation(Attestation)
An attestation block (starts with !attest).
ThematicBreak
A horizontal rule / thematic break.
BlockQuote(Vec<Block>)
A block quotation containing nested blocks.
List
An unordered or ordered list.
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 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