#[non_exhaustive]pub enum Block<'src> {
Simple(SimpleBlock<'src>),
Media(MediaBlock<'src>),
Section(SectionBlock<'src>),
RawDelimited(RawDelimitedBlock<'src>),
CompoundDelimited(CompoundDelimitedBlock<'src>),
DocumentAttribute(Attribute<'src>),
}Expand description
Block elements form the main structure of an AsciiDoc document, starting with the document itself.
A block element (aka block) is a discrete, line-oriented chunk of content in an AsciiDoc document. Once parsed, that chunk of content becomes a block element in the parsed document model. Certain blocks may contain other blocks, so we say that blocks can be nested. The converter visits each block in turn, in document order, converting it to a corresponding chunk of output.
This enum represents all of the block types that are understood directly by
this parser and also implements the IsBlock trait.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Simple(SimpleBlock<'src>)
A block that’s treated as contiguous lines of paragraph text (and subject to normal substitutions) (e.g., a paragraph block).
Media(MediaBlock<'src>)
A media block is used to represent an image, video, or audio block macro.
Section(SectionBlock<'src>)
A section helps to partition the document into a content hierarchy. May also be a part, chapter, or special section.
RawDelimited(RawDelimitedBlock<'src>)
A delimited block that contains verbatim, raw, or comment text. The content between the matching delimiters is not parsed for block syntax.
CompoundDelimited(CompoundDelimitedBlock<'src>)
A delimited block that can contain other blocks.
DocumentAttribute(Attribute<'src>)
When an attribute is defined in the document body using an attribute entry, that’s simply referred to as a document attribute.
Trait Implementations§
Source§impl<'src> IsBlock<'src> for Block<'src>
impl<'src> IsBlock<'src> for Block<'src>
Source§fn content_model(&self) -> ContentModel
fn content_model(&self) -> ContentModel
ContentModel for this block.