#[non_exhaustive]pub enum Block<'src> {
Simple(SimpleBlock<'src>),
Macro(MacroBlock<'src>),
Section(SectionBlock<'src>),
RawDelimited(RawDelimitedBlock<'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).
Macro(MacroBlock<'src>)
A block macro is a syntax for representing non-text elements or syntax that expands into text using the provided metadata.
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.
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
impl<'src> Eq for Block<'src>
impl<'src> StructuralPartialEq for Block<'src>
Auto Trait Implementations§
impl<'src> Freeze for Block<'src>
impl<'src> RefUnwindSafe for Block<'src>
impl<'src> Send for Block<'src>
impl<'src> Sync for Block<'src>
impl<'src> Unpin for Block<'src>
impl<'src> UnwindSafe for Block<'src>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)