Trait somedoc::model::visitor::BlockVisitor [−][src]
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]
&self,
level: &HeadingLevel,
label: &Option<Label>
) -> Result<()>
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]
&self,
value: &Image,
caption: &Option<Caption>,
label: &Option<Label>
) -> Result<()>
Visit each BlockContent::Image
instance.
fn math(
&self,
value: &Math,
caption: &Option<Caption>,
label: &Option<Label>
) -> Result<()>
[src]
&self,
value: &Math,
caption: &Option<Caption>,
label: &Option<Label>
) -> Result<()>
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]
&self,
code: &str,
language: &Option<String>,
caption: &Option<Caption>,
label: &Option<Label>
) -> Result<()>
Visit each BlockContent::CodeBlock
instance.
fn start_paragraph(
&self,
alignment: &Alignment,
label: &Option<Label>
) -> Result<()>
[src]
&self,
alignment: &Alignment,
label: &Option<Label>
) -> Result<()>
Called at the start of each BlockContent::Paragraph
instance, before any inner content.
fn end_paragraph(
&self,
alignment: &Alignment,
label: &Option<Label>
) -> Result<()>
[src]
&self,
alignment: &Alignment,
label: &Option<Label>
) -> Result<()>
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.
Implementors
impl<'a, W: Write> BlockVisitor for HtmlWriter<'a, W>
[src]
fn start_block(&self) -> Result<()>
[src]
fn comment(&self, value: &str) -> Result<()>
[src]
fn start_heading(
&self,
level: &HeadingLevel,
label: &Option<Label>
) -> Result<()>
[src]
&self,
level: &HeadingLevel,
label: &Option<Label>
) -> Result<()>
fn end_heading(
&self,
level: &HeadingLevel,
_label: &Option<Label>
) -> Result<()>
[src]
&self,
level: &HeadingLevel,
_label: &Option<Label>
) -> Result<()>
fn image(
&self,
value: &Image,
_caption: &Option<Caption>,
label: &Option<Label>
) -> Result<()>
[src]
&self,
value: &Image,
_caption: &Option<Caption>,
label: &Option<Label>
) -> Result<()>
fn math(
&self,
value: &Math,
_caption: &Option<Caption>,
label: &Option<Label>
) -> Result<()>
[src]
&self,
value: &Math,
_caption: &Option<Caption>,
label: &Option<Label>
) -> Result<()>
fn start_list(&self, kind: &ListKind, label: &Option<Label>) -> Result<()>
[src]
fn end_list(&self, kind: &ListKind, _label: &Option<Label>) -> Result<()>
[src]
fn start_list_item(&self, label: &Option<Label>) -> Result<()>
[src]
fn end_list_item(&self, _label: &Option<Label>) -> Result<()>
[src]
fn start_definition_list(&self, label: &Option<Label>) -> Result<()>
[src]
fn end_definition_list(&self, _label: &Option<Label>) -> Result<()>
[src]
fn start_definition(&self, term: &str, label: &Option<Label>) -> Result<()>
[src]
fn start_definition_list_text(&self) -> Result<()>
[src]
fn end_definition_list_text(&self) -> Result<()>
[src]
fn formatted(&self, value: &str, label: &Option<Label>) -> Result<()>
[src]
fn code_block(
&self,
code: &str,
language: &Option<String>,
_caption: &Option<Caption>,
label: &Option<Label>
) -> Result<()>
[src]
&self,
code: &str,
language: &Option<String>,
_caption: &Option<Caption>,
label: &Option<Label>
) -> Result<()>
fn start_paragraph(
&self,
_alignment: &Alignment,
label: &Option<Label>
) -> Result<()>
[src]
&self,
_alignment: &Alignment,
label: &Option<Label>
) -> Result<()>
fn end_paragraph(
&self,
_alignment: &Alignment,
_label: &Option<Label>
) -> Result<()>
[src]
&self,
_alignment: &Alignment,
_label: &Option<Label>
) -> Result<()>
fn start_quote(&self, label: &Option<Label>) -> Result<()>
[src]
fn end_quote(&self, _label: &Option<Label>) -> Result<()>
[src]
fn thematic_break(&self) -> Result<()>
[src]
fn end_block(&self) -> Result<()>
[src]
fn table_visitor(&self) -> Option<&dyn TableVisitor>
[src]
fn inline_visitor(&self) -> Option<&dyn InlineVisitor>
[src]
impl<'a, W: Write> BlockVisitor for LatexWriter<'a, W>
[src]
fn start_block(&self) -> Result<()>
[src]
fn comment(&self, value: &str) -> Result<()>
[src]
fn front_matter(&self, value: &FrontMatter) -> Result<()>
[src]
fn start_heading(
&self,
level: &HeadingLevel,
label: &Option<Label>
) -> Result<()>
[src]
&self,
level: &HeadingLevel,
label: &Option<Label>
) -> Result<()>
fn end_heading(&self, _: &HeadingLevel, _: &Option<Label>) -> Result<()>
[src]
fn image(
&self,
value: &Image,
caption: &Option<Caption>,
label: &Option<Label>
) -> Result<()>
[src]
&self,
value: &Image,
caption: &Option<Caption>,
label: &Option<Label>
) -> Result<()>
fn math(
&self,
value: &Math,
caption: &Option<Caption>,
label: &Option<Label>
) -> Result<()>
[src]
&self,
value: &Math,
caption: &Option<Caption>,
label: &Option<Label>
) -> Result<()>
fn start_list(&self, kind: &ListKind, label: &Option<Label>) -> Result<()>
[src]
fn end_list(&self, kind: &ListKind, _: &Option<Label>) -> Result<()>
[src]
fn start_list_item(&self, label: &Option<Label>) -> Result<()>
[src]
fn end_list_item(&self, _: &Option<Label>) -> Result<()>
[src]
fn start_definition_list(&self, label: &Option<Label>) -> Result<()>
[src]
fn end_definition_list(&self, _: &Option<Label>) -> Result<()>
[src]
fn start_definition(&self, term: &str, label: &Option<Label>) -> Result<()>
[src]
fn start_definition_list_text(&self) -> Result<()>
[src]
fn end_definition_list_text(&self) -> Result<()>
[src]
fn formatted(&self, value: &str, label: &Option<Label>) -> Result<()>
[src]
fn code_block(
&self,
code: &str,
language: &Option<String>,
caption: &Option<Caption>,
label: &Option<Label>
) -> Result<()>
[src]
&self,
code: &str,
language: &Option<String>,
caption: &Option<Caption>,
label: &Option<Label>
) -> Result<()>
fn start_paragraph(
&self,
_alignment: &Alignment,
label: &Option<Label>
) -> Result<()>
[src]
&self,
_alignment: &Alignment,
label: &Option<Label>
) -> Result<()>
fn end_paragraph(&self, _alignment: &Alignment, _: &Option<Label>) -> Result<()>
[src]
fn start_quote(&self, label: &Option<Label>) -> Result<()>
[src]
fn end_quote(&self, _: &Option<Label>) -> Result<()>
[src]
fn thematic_break(&self) -> Result<()>
[src]
fn end_block(&self) -> Result<()>
[src]
fn table_visitor(&self) -> Option<&dyn TableVisitor>
[src]
fn inline_visitor(&self) -> Option<&dyn InlineVisitor>
[src]
impl<'a, W: Write> BlockVisitor for MarkdownWriter<'a, W>
[src]
fn start_block(&self) -> Result<()>
[src]
fn comment(&self, value: &str) -> Result<()>
[src]
fn front_matter(&self, value: &FrontMatter) -> Result<()>
[src]
fn start_heading(
&self,
level: &HeadingLevel,
label: &Option<Label>
) -> Result<()>
[src]
&self,
level: &HeadingLevel,
label: &Option<Label>
) -> Result<()>
fn end_heading(&self, level: &HeadingLevel, label: &Option<Label>) -> Result<()>
[src]
fn image(
&self,
value: &Image,
_caption: &Option<Caption>,
label: &Option<Label>
) -> Result<()>
[src]
&self,
value: &Image,
_caption: &Option<Caption>,
label: &Option<Label>
) -> Result<()>
fn math(
&self,
value: &Math,
_caption: &Option<Caption>,
label: &Option<Label>
) -> Result<()>
[src]
&self,
value: &Math,
_caption: &Option<Caption>,
label: &Option<Label>
) -> Result<()>
fn start_list(&self, kind: &ListKind, label: &Option<Label>) -> Result<()>
[src]
fn end_list(&self, _: &ListKind, _: &Option<Label>) -> Result<()>
[src]
fn start_list_item(&self, _: &Option<Label>) -> Result<()>
[src]
fn end_list_item(&self, _: &Option<Label>) -> Result<()>
[src]
fn start_definition(&self, term: &str, label: &Option<Label>) -> Result<()>
[src]
fn start_definition_list_text(&self) -> Result<()>
[src]
fn formatted(&self, value: &str, label: &Option<Label>) -> Result<()>
[src]
fn code_block(
&self,
code: &str,
language: &Option<String>,
_caption: &Option<Caption>,
label: &Option<Label>
) -> Result<()>
[src]
&self,
code: &str,
language: &Option<String>,
_caption: &Option<Caption>,
label: &Option<Label>
) -> Result<()>