#[non_exhaustive]pub enum Block {
Heading(Text),
Paragraph(Text),
Verbatim(String),
Fields(Fields),
Table(Table),
Section(Section),
Notice(Notice),
Rule(Rule),
}Available on crate feature
document only.Expand description
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Heading(Text)
A heading, drawn in Role::Heading.
Paragraph(Text)
Prose that wraps to the width.
Verbatim(String)
Preformatted text whose line breaks survive rendering.
The renderer removes terminal control characters, bidirectional controls, and the Unicode line separators U+2028 and U+2029, but keeps newlines and tabs. It strips newlines from the end, and expands a tab to the next multiple of 8 cells. Other Unicode formatting characters stay.
Fields(Fields)
A record of label and value rows.
Table(Table)
A table, with or without a header row.
Section(Section)
A heading over a nested document.
Notice(Notice)
A level label with an optional code and a message.
Rule(Rule)
A horizontal rule, optionally titled.
Trait Implementations§
impl Eq for Block
impl StructuralPartialEq for Block
Auto Trait Implementations§
impl Forget for Block
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