pub trait GenericTransformer<T> {
Show 43 methods
// Provided methods
fn transform_document(&mut self, doc: Document<T>) -> Document<T> { ... }
fn transform_block(&mut self, block: Block<T>) -> Block<T> { ... }
fn transform_inline(&mut self, inline: Inline<T>) -> Inline<T> { ... }
fn transform_table_cell(&mut self, cell: TableCell<T>) -> TableCell<T> { ... }
fn transform_list_item(&mut self, item: ListItem<T>) -> ListItem<T> { ... }
fn transform_table_row(&mut self, row: TableRow<T>) -> TableRow<T> { ... }
fn transform_heading(&mut self, heading: Heading<T>) -> Heading<T> { ... }
fn transform_link(&mut self, link: Link<T>) -> Link<T> { ... }
fn transform_image(&mut self, image: Image<T>) -> Image<T> { ... }
fn transform_code_block(&mut self, code_block: CodeBlock<T>) -> CodeBlock<T> { ... }
fn transform_footnote_definition(
&mut self,
footnote: FootnoteDefinition<T>,
) -> FootnoteDefinition<T> { ... }
fn transform_github_alert(
&mut self,
alert: GitHubAlertNode<T>,
) -> GitHubAlertNode<T> { ... }
fn expand_document(&mut self, doc: Document<T>) -> Vec<Document<T>> { ... }
fn expand_block(&mut self, block: Block<T>) -> Vec<Block<T>> { ... }
fn expand_inline(&mut self, inline: Inline<T>) -> Vec<Inline<T>> { ... }
fn expand_table_cell(&mut self, cell: TableCell<T>) -> Vec<TableCell<T>> ⓘ { ... }
fn expand_list_item(&mut self, item: ListItem<T>) -> Vec<ListItem<T>> { ... }
fn expand_table_row(&mut self, row: TableRow<T>) -> Vec<TableRow<T>> ⓘ { ... }
fn expand_heading(&mut self, heading: Heading<T>) -> Vec<Heading<T>> { ... }
fn expand_link(&mut self, link: Link<T>) -> Vec<Link<T>> { ... }
fn expand_image(&mut self, image: Image<T>) -> Vec<Image<T>> { ... }
fn expand_code_block(
&mut self,
code_block: CodeBlock<T>,
) -> Vec<CodeBlock<T>> { ... }
fn expand_footnote_definition(
&mut self,
footnote: FootnoteDefinition<T>,
) -> Vec<FootnoteDefinition<T>> { ... }
fn expand_github_alert(
&mut self,
alert: GitHubAlertNode<T>,
) -> Vec<GitHubAlertNode<T>> { ... }
fn walk_transform_document(&mut self, doc: Document<T>) -> Document<T> { ... }
fn walk_transform_block(&mut self, block: Block<T>) -> Block<T> { ... }
fn walk_transform_inline(&mut self, inline: Inline<T>) -> Inline<T> { ... }
fn walk_transform_table_cell(&mut self, cell: TableCell<T>) -> TableCell<T> { ... }
fn walk_transform_list_item(&mut self, item: ListItem<T>) -> ListItem<T> { ... }
fn walk_transform_table_row(&mut self, row: TableRow<T>) -> TableRow<T> { ... }
fn walk_transform_heading(&mut self, heading: Heading<T>) -> Heading<T> { ... }
fn walk_transform_link(&mut self, link: Link<T>) -> Link<T> { ... }
fn walk_transform_image(&mut self, image: Image<T>) -> Image<T> { ... }
fn walk_transform_code_block(
&mut self,
code_block: CodeBlock<T>,
) -> CodeBlock<T> { ... }
fn walk_transform_footnote_definition(
&mut self,
footnote: FootnoteDefinition<T>,
) -> FootnoteDefinition<T> { ... }
fn walk_transform_github_alert(
&mut self,
alert: GitHubAlertNode<T>,
) -> GitHubAlertNode<T> { ... }
fn transform_list_item_container(&mut self, list: List<T>) -> List<T> { ... }
fn transform_table(&mut self, table: Table<T>) -> Table<T> { ... }
fn walk_expand_document(&mut self, doc: Document<T>) -> Vec<Document<T>> { ... }
fn walk_expand_block(&mut self, block: Block<T>) -> Vec<Block<T>> { ... }
fn walk_expand_inline(&mut self, inline: Inline<T>) -> Vec<Inline<T>> { ... }
fn expand_list_container(&mut self, list: List<T>) -> Vec<List<T>> { ... }
fn expand_table_container(&mut self, table: Table<T>) -> Vec<Table<T>> { ... }
}Expand description
Generic transformer trait for AST nodes with user data
This trait provides the same transformation capabilities as the regular Transformer trait, but works with generic AST nodes that contain user data.
Provided Methods§
Sourcefn transform_document(&mut self, doc: Document<T>) -> Document<T>
fn transform_document(&mut self, doc: Document<T>) -> Document<T>
Transform a document with user data
Sourcefn transform_block(&mut self, block: Block<T>) -> Block<T>
fn transform_block(&mut self, block: Block<T>) -> Block<T>
Transform a block with user data
Sourcefn transform_inline(&mut self, inline: Inline<T>) -> Inline<T>
fn transform_inline(&mut self, inline: Inline<T>) -> Inline<T>
Transform an inline with user data
Sourcefn transform_table_cell(&mut self, cell: TableCell<T>) -> TableCell<T>
fn transform_table_cell(&mut self, cell: TableCell<T>) -> TableCell<T>
Transform a table cell with user data
Sourcefn transform_list_item(&mut self, item: ListItem<T>) -> ListItem<T>
fn transform_list_item(&mut self, item: ListItem<T>) -> ListItem<T>
Transform a list item with user data
Sourcefn transform_table_row(&mut self, row: TableRow<T>) -> TableRow<T>
fn transform_table_row(&mut self, row: TableRow<T>) -> TableRow<T>
Transform a table row with user data
Sourcefn transform_heading(&mut self, heading: Heading<T>) -> Heading<T>
fn transform_heading(&mut self, heading: Heading<T>) -> Heading<T>
Transform a heading with user data
Sourcefn transform_link(&mut self, link: Link<T>) -> Link<T>
fn transform_link(&mut self, link: Link<T>) -> Link<T>
Transform a link with user data
Sourcefn transform_image(&mut self, image: Image<T>) -> Image<T>
fn transform_image(&mut self, image: Image<T>) -> Image<T>
Transform an image with user data
Sourcefn transform_code_block(&mut self, code_block: CodeBlock<T>) -> CodeBlock<T>
fn transform_code_block(&mut self, code_block: CodeBlock<T>) -> CodeBlock<T>
Transform a code block with user data
Sourcefn transform_footnote_definition(
&mut self,
footnote: FootnoteDefinition<T>,
) -> FootnoteDefinition<T>
fn transform_footnote_definition( &mut self, footnote: FootnoteDefinition<T>, ) -> FootnoteDefinition<T>
Transform a footnote definition with user data
Sourcefn transform_github_alert(
&mut self,
alert: GitHubAlertNode<T>,
) -> GitHubAlertNode<T>
fn transform_github_alert( &mut self, alert: GitHubAlertNode<T>, ) -> GitHubAlertNode<T>
Transform a GitHub alert with user data
Sourcefn expand_document(&mut self, doc: Document<T>) -> Vec<Document<T>>
fn expand_document(&mut self, doc: Document<T>) -> Vec<Document<T>>
Transform a document with possibility to expand into multiple documents
Sourcefn expand_block(&mut self, block: Block<T>) -> Vec<Block<T>>
fn expand_block(&mut self, block: Block<T>) -> Vec<Block<T>>
Transform a block with possibility to expand into multiple blocks
Sourcefn expand_inline(&mut self, inline: Inline<T>) -> Vec<Inline<T>>
fn expand_inline(&mut self, inline: Inline<T>) -> Vec<Inline<T>>
Transform an inline with possibility to expand into multiple inlines
Sourcefn expand_table_cell(&mut self, cell: TableCell<T>) -> Vec<TableCell<T>> ⓘ
fn expand_table_cell(&mut self, cell: TableCell<T>) -> Vec<TableCell<T>> ⓘ
Transform a table cell with possibility to expand into multiple cells
Sourcefn expand_list_item(&mut self, item: ListItem<T>) -> Vec<ListItem<T>>
fn expand_list_item(&mut self, item: ListItem<T>) -> Vec<ListItem<T>>
Transform a list item with possibility to expand into multiple items
Sourcefn expand_table_row(&mut self, row: TableRow<T>) -> Vec<TableRow<T>> ⓘ
fn expand_table_row(&mut self, row: TableRow<T>) -> Vec<TableRow<T>> ⓘ
Transform a table row with possibility to expand into multiple rows
Sourcefn expand_heading(&mut self, heading: Heading<T>) -> Vec<Heading<T>>
fn expand_heading(&mut self, heading: Heading<T>) -> Vec<Heading<T>>
Transform a heading with possibility to expand into multiple headings
Sourcefn expand_link(&mut self, link: Link<T>) -> Vec<Link<T>>
fn expand_link(&mut self, link: Link<T>) -> Vec<Link<T>>
Transform a link with possibility to expand into multiple links
Sourcefn expand_image(&mut self, image: Image<T>) -> Vec<Image<T>>
fn expand_image(&mut self, image: Image<T>) -> Vec<Image<T>>
Transform an image with possibility to expand into multiple images
Sourcefn expand_code_block(&mut self, code_block: CodeBlock<T>) -> Vec<CodeBlock<T>>
fn expand_code_block(&mut self, code_block: CodeBlock<T>) -> Vec<CodeBlock<T>>
Transform a code block with possibility to expand into multiple code blocks
Sourcefn expand_footnote_definition(
&mut self,
footnote: FootnoteDefinition<T>,
) -> Vec<FootnoteDefinition<T>>
fn expand_footnote_definition( &mut self, footnote: FootnoteDefinition<T>, ) -> Vec<FootnoteDefinition<T>>
Transform a footnote definition with possibility to expand into multiple definitions
Sourcefn expand_github_alert(
&mut self,
alert: GitHubAlertNode<T>,
) -> Vec<GitHubAlertNode<T>>
fn expand_github_alert( &mut self, alert: GitHubAlertNode<T>, ) -> Vec<GitHubAlertNode<T>>
Transform a GitHub alert with possibility to expand into multiple alerts
Sourcefn walk_transform_document(&mut self, doc: Document<T>) -> Document<T>
fn walk_transform_document(&mut self, doc: Document<T>) -> Document<T>
Default transformation for document with user data
Sourcefn walk_transform_block(&mut self, block: Block<T>) -> Block<T>
fn walk_transform_block(&mut self, block: Block<T>) -> Block<T>
Default transformation for block nodes with user data
Sourcefn walk_transform_inline(&mut self, inline: Inline<T>) -> Inline<T>
fn walk_transform_inline(&mut self, inline: Inline<T>) -> Inline<T>
Default transformation for inline nodes with user data
Sourcefn walk_transform_table_cell(&mut self, cell: TableCell<T>) -> TableCell<T>
fn walk_transform_table_cell(&mut self, cell: TableCell<T>) -> TableCell<T>
Default transformation for table cells with user data
Sourcefn walk_transform_list_item(&mut self, item: ListItem<T>) -> ListItem<T>
fn walk_transform_list_item(&mut self, item: ListItem<T>) -> ListItem<T>
Default transformation for list items with user data
Sourcefn walk_transform_table_row(&mut self, row: TableRow<T>) -> TableRow<T>
fn walk_transform_table_row(&mut self, row: TableRow<T>) -> TableRow<T>
Default transformation for table rows with user data
Sourcefn walk_transform_heading(&mut self, heading: Heading<T>) -> Heading<T>
fn walk_transform_heading(&mut self, heading: Heading<T>) -> Heading<T>
Default transformation for headings with user data
Sourcefn walk_transform_link(&mut self, link: Link<T>) -> Link<T>
fn walk_transform_link(&mut self, link: Link<T>) -> Link<T>
Default transformation for links with user data
Sourcefn walk_transform_image(&mut self, image: Image<T>) -> Image<T>
fn walk_transform_image(&mut self, image: Image<T>) -> Image<T>
Default transformation for images with user data
Sourcefn walk_transform_code_block(
&mut self,
code_block: CodeBlock<T>,
) -> CodeBlock<T>
fn walk_transform_code_block( &mut self, code_block: CodeBlock<T>, ) -> CodeBlock<T>
Default transformation for code blocks with user data
Sourcefn walk_transform_footnote_definition(
&mut self,
footnote: FootnoteDefinition<T>,
) -> FootnoteDefinition<T>
fn walk_transform_footnote_definition( &mut self, footnote: FootnoteDefinition<T>, ) -> FootnoteDefinition<T>
Default transformation for footnote definitions with user data
Sourcefn walk_transform_github_alert(
&mut self,
alert: GitHubAlertNode<T>,
) -> GitHubAlertNode<T>
fn walk_transform_github_alert( &mut self, alert: GitHubAlertNode<T>, ) -> GitHubAlertNode<T>
Default transformation for GitHub alerts with user data
Sourcefn transform_list_item_container(&mut self, list: List<T>) -> List<T>
fn transform_list_item_container(&mut self, list: List<T>) -> List<T>
Helper to transform list container
Sourcefn transform_table(&mut self, table: Table<T>) -> Table<T>
fn transform_table(&mut self, table: Table<T>) -> Table<T>
Helper to transform table
Sourcefn walk_expand_document(&mut self, doc: Document<T>) -> Vec<Document<T>>
fn walk_expand_document(&mut self, doc: Document<T>) -> Vec<Document<T>>
Default expandable transformation for document using flat_map
Sourcefn walk_expand_block(&mut self, block: Block<T>) -> Vec<Block<T>>
fn walk_expand_block(&mut self, block: Block<T>) -> Vec<Block<T>>
Default expandable transformation for block nodes using flat_map
Sourcefn walk_expand_inline(&mut self, inline: Inline<T>) -> Vec<Inline<T>>
fn walk_expand_inline(&mut self, inline: Inline<T>) -> Vec<Inline<T>>
Default expandable transformation for inline nodes using flat_map
Sourcefn expand_list_container(&mut self, list: List<T>) -> Vec<List<T>>
fn expand_list_container(&mut self, list: List<T>) -> Vec<List<T>>
Helper to expand list container
Sourcefn expand_table_container(&mut self, table: Table<T>) -> Vec<Table<T>>
fn expand_table_container(&mut self, table: Table<T>) -> Vec<Table<T>>
Helper to expand table container