pub enum MarkupBlock {
Heading {
level: u8,
text: Vec<Inline>,
id: Option<String>,
span: Option<Span>,
},
Paragraph {
content: Vec<Inline>,
span: Option<Span>,
},
CodeBlock {
lang: Option<String>,
code: String,
span: Option<Span>,
},
MathBlock {
source: MathSource,
span: Option<Span>,
},
Quote {
blocks: Vec<MarkupBlock>,
span: Option<Span>,
},
List {
ordered: bool,
items: Vec<Vec<MarkupBlock>>,
span: Option<Span>,
},
Table {
header: Vec<Vec<Inline>>,
rows: Vec<Vec<Vec<Inline>>>,
span: Option<Span>,
},
Figure {
src: String,
caption: Vec<Inline>,
span: Option<Span>,
},
Raw {
backend: BackendId,
text: String,
span: Option<Span>,
},
}Expand description
A semantic block in a markup document.
Variants§
Heading
A heading with inline text.
Fields
Paragraph
A paragraph of inline content.
CodeBlock
A fenced or literal code block.
Fields
MathBlock
A display math block.
Quote
A block quote.
List
An ordered or unordered list.
Fields
§
items: Vec<Vec<MarkupBlock>>List items, each item containing block content.
Table
A simple table.
Fields
Figure
A figure with source and caption.
Fields
Raw
Backend-specific raw text.
Implementations§
Trait Implementations§
Source§impl Clone for MarkupBlock
impl Clone for MarkupBlock
Source§fn clone(&self) -> MarkupBlock
fn clone(&self) -> MarkupBlock
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 MarkupBlock
impl Debug for MarkupBlock
Source§impl PartialEq for MarkupBlock
impl PartialEq for MarkupBlock
impl StructuralPartialEq for MarkupBlock
Auto Trait Implementations§
impl Freeze for MarkupBlock
impl RefUnwindSafe for MarkupBlock
impl Send for MarkupBlock
impl Sync for MarkupBlock
impl Unpin for MarkupBlock
impl UnsafeUnpin for MarkupBlock
impl UnwindSafe for MarkupBlock
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more