pub enum Block {
Heading {
level: u8,
inlines: Vec<Inline>,
align: Align,
},
Paragraph {
inlines: Vec<Inline>,
align: Align,
},
List(List),
Quote(Vec<Block>),
Code {
lang: Option<String>,
text: String,
},
Divider,
Image(BlockImage),
Columns(Columns),
Table(Table),
Progress(Progress),
}Expand description
块级元素。
Variants§
Heading
标题(h1–h6)。
Paragraph
段落。
List(List)
有序 / 无序列表(项内容是块序列,可嵌套、可多段)。
Quote(Vec<Block>)
引用块(裹块,可嵌套)。
Code
代码块(等宽、带底色;不做语法高亮)。
Divider
分割线。
Image(BlockImage)
块级图片(可带宽度 / 对齐 / 图注)。
Columns(Columns)
多栏并排。
Table(Table)
表格。
Progress(Progress)
进度条。
Trait Implementations§
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