Trait somedoc::model::visitor::BlockVisitor[][src]

pub trait BlockVisitor {
    fn start_block(&self) -> Result<()> { ... }
fn start_abstract(&self) -> Result<()> { ... }
fn end_abstract(&self) -> Result<()> { ... }
fn comment(&self, value: &str) -> Result<()> { ... }
fn front_matter(&self, value: &FrontMatter) -> Result<()> { ... }
fn start_heading(
        &self,
        level: &HeadingLevel,
        label: &Option<Label>
    ) -> Result<()> { ... }
fn end_heading(
        &self,
        level: &HeadingLevel,
        label: &Option<Label>
    ) -> Result<()> { ... }
fn image(
        &self,
        value: &Image,
        caption: &Option<Caption>,
        label: &Option<Label>
    ) -> Result<()> { ... }
fn math(
        &self,
        value: &Math,
        caption: &Option<Caption>,
        label: &Option<Label>
    ) -> Result<()> { ... }
fn start_list(&self, kind: &ListKind, label: &Option<Label>) -> Result<()> { ... }
fn end_list(&self, kind: &ListKind, label: &Option<Label>) -> Result<()> { ... }
fn start_list_item(&self, label: &Option<Label>) -> Result<()> { ... }
fn end_list_item(&self, label: &Option<Label>) -> Result<()> { ... }
fn start_definition_list(&self, label: &Option<Label>) -> Result<()> { ... }
fn end_definition_list(&self, label: &Option<Label>) -> Result<()> { ... }
fn start_definition(&self, term: &str, label: &Option<Label>) -> Result<()> { ... }
fn start_definition_list_text(&self) -> Result<()> { ... }
fn end_definition_list_text(&self) -> Result<()> { ... }
fn end_definition(&self, term: &str, label: &Option<Label>) -> Result<()> { ... }
fn formatted(&self, value: &str, label: &Option<Label>) -> Result<()> { ... }
fn code_block(
        &self,
        code: &str,
        language: &Option<String>,
        caption: &Option<Caption>,
        label: &Option<Label>
    ) -> Result<()> { ... }
fn start_paragraph(
        &self,
        alignment: &Alignment,
        label: &Option<Label>
    ) -> Result<()> { ... }
fn end_paragraph(
        &self,
        alignment: &Alignment,
        label: &Option<Label>
    ) -> Result<()> { ... }
fn start_quote(&self, label: &Option<Label>) -> Result<()> { ... }
fn end_quote(&self, label: &Option<Label>) -> Result<()> { ... }
fn thematic_break(&self) -> Result<()> { ... }
fn end_block(&self) -> Result<()> { ... }
fn table_visitor(&self) -> Option<&dyn TableVisitor> { ... }
fn inline_visitor(&self) -> Option<&dyn InlineVisitor> { ... } }

The visitor trait for all block content instances.

Provided methods

fn start_block(&self) -> Result<()>[src]

Called at the start of each BlockContent instance, before any value.

fn start_abstract(&self) -> Result<()>[src]

Called at the start of the document's abstract.

fn end_abstract(&self) -> Result<()>[src]

Called at the end of the document's abstract.

fn comment(&self, value: &str) -> Result<()>[src]

Visit each BlockContent::Comment instance.

fn front_matter(&self, value: &FrontMatter) -> Result<()>[src]

Visit each BlockContent::FrontMatter instance.

fn start_heading(
    &self,
    level: &HeadingLevel,
    label: &Option<Label>
) -> Result<()>
[src]

Called at the start of each BlockContent::Heading instance, before any inner content.

fn end_heading(&self, level: &HeadingLevel, label: &Option<Label>) -> Result<()>[src]

Called at the end of each BlockContent::Heading instance, after any inner content.

fn image(
    &self,
    value: &Image,
    caption: &Option<Caption>,
    label: &Option<Label>
) -> Result<()>
[src]

Visit each BlockContent::Image instance.

fn math(
    &self,
    value: &Math,
    caption: &Option<Caption>,
    label: &Option<Label>
) -> Result<()>
[src]

Visit each BlockContent::MathBlock instance.

fn start_list(&self, kind: &ListKind, label: &Option<Label>) -> Result<()>[src]

Called at the start of each BlockContent::List instance, before any inner content.

fn end_list(&self, kind: &ListKind, label: &Option<Label>) -> Result<()>[src]

Called at the start of each BlockContent::List instance, before any inner content.

fn start_list_item(&self, label: &Option<Label>) -> Result<()>[src]

Called at the start of each Item instance, before any inner content.

fn end_list_item(&self, label: &Option<Label>) -> Result<()>[src]

Called at the end of each Item instance, after any inner content.

fn start_definition_list(&self, label: &Option<Label>) -> Result<()>[src]

Called at the start of each BlockContent::DefinitionList instance, before any inner content.

fn end_definition_list(&self, label: &Option<Label>) -> Result<()>[src]

Called at the end of each BlockContent::DefinitionList instance, after any inner content.

fn start_definition(&self, term: &str, label: &Option<Label>) -> Result<()>[src]

Called at the start of each Definition instance term, before any inner content.

fn start_definition_list_text(&self) -> Result<()>[src]

Called at the start of each Definition instance text, before any inner content.

fn end_definition_list_text(&self) -> Result<()>[src]

Called at the end of each Definition instance text, after any inner content.

fn end_definition(&self, term: &str, label: &Option<Label>) -> Result<()>[src]

Called at the end of each Definition instance term, after any inner content.

fn formatted(&self, value: &str, label: &Option<Label>) -> Result<()>[src]

Visit each BlockContent::Formatted instance.

fn code_block(
    &self,
    code: &str,
    language: &Option<String>,
    caption: &Option<Caption>,
    label: &Option<Label>
) -> Result<()>
[src]

Visit each BlockContent::CodeBlock instance.

fn start_paragraph(
    &self,
    alignment: &Alignment,
    label: &Option<Label>
) -> Result<()>
[src]

Called at the start of each BlockContent::Paragraph instance, before any inner content.

fn end_paragraph(
    &self,
    alignment: &Alignment,
    label: &Option<Label>
) -> Result<()>
[src]

Called at the end of each BlockContent::Paragraph instance, after any inner content.

fn start_quote(&self, label: &Option<Label>) -> Result<()>[src]

Called at the start of each BlockContent::Quote instance, before any inner content.

fn end_quote(&self, label: &Option<Label>) -> Result<()>[src]

Called at the end of each BlockContent::Quote instance, after any inner content.

fn thematic_break(&self) -> Result<()>[src]

Visit each BlockContent::ThematicBreak instance.

fn end_block(&self) -> Result<()>[src]

Called at the end of each BlockContent instance, after any value.

fn table_visitor(&self) -> Option<&dyn TableVisitor>[src]

Return an implementation of the TableVisitor trait, if one exists.

fn inline_visitor(&self) -> Option<&dyn InlineVisitor>[src]

Return an implementation of the InlineVisitor trait, if one exists.

Loading content...

Implementors

impl<'a, W: Write> BlockVisitor for HtmlWriter<'a, W>[src]

impl<'a, W: Write> BlockVisitor for LatexWriter<'a, W>[src]

impl<'a, W: Write> BlockVisitor for MarkdownWriter<'a, W>[src]

Loading content...