CompositeTransformer

Struct CompositeTransformer 

Source
pub struct CompositeTransformer { /* private fields */ }
Expand description

Composite transformer that applies multiple transformers in sequence

Implementations§

Source§

impl CompositeTransformer

Source

pub fn new() -> Self

Create a new composite transformer

Source

pub fn add_transformer<T: Transformer + 'static>(self, transformer: T) -> Self

Add a transformer to the sequence

Trait Implementations§

Source§

impl Default for CompositeTransformer

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Transformer for CompositeTransformer

Source§

fn transform_document(&mut self, doc: Document) -> Document

Transform a document node
Source§

fn transform_block(&mut self, block: Block) -> Block

Transform a block node
Source§

fn transform_inline(&mut self, inline: Inline) -> Inline

Transform an inline node
Source§

fn transform_table_cell(&mut self, cell: TableCell) -> TableCell

Transform a table cell
Source§

fn transform_list_item(&mut self, item: ListItem) -> ListItem

Transform a list item
Source§

fn transform_table_row(&mut self, row: TableRow) -> TableRow

Transform a table row
Source§

fn transform_heading(&mut self, heading: Heading) -> Heading

Transform a heading
Transform a link
Source§

fn transform_image(&mut self, image: Image) -> Image

Transform an image
Source§

fn transform_code_block(&mut self, code_block: CodeBlock) -> CodeBlock

Transform a code block
Source§

fn transform_text(&mut self, text: String) -> String

Transform text content
Source§

fn transform_footnote_definition( &mut self, footnote: FootnoteDefinition, ) -> FootnoteDefinition

Transform a footnote definition
Source§

fn transform_github_alert(&mut self, alert: GitHubAlert) -> GitHubAlert

Transform a GitHub alert
Source§

fn walk_transform_document(&mut self, doc: Document) -> Document

Default transformation for document
Source§

fn walk_transform_block(&mut self, block: Block) -> Block

Default transformation for block nodes
Source§

fn walk_transform_inline(&mut self, inline: Inline) -> Inline

Default transformation for inline nodes
Source§

fn walk_transform_table_cell(&mut self, cell: TableCell) -> TableCell

Default transformation for table cells
Source§

fn walk_transform_list_item(&mut self, item: ListItem) -> ListItem

Default transformation for list items
Source§

fn walk_transform_table_row(&mut self, row: TableRow) -> TableRow

Default transformation for table rows
Source§

fn walk_transform_heading(&mut self, heading: Heading) -> Heading

Default transformation for headings
Default transformation for links
Source§

fn walk_transform_image(&mut self, image: Image) -> Image

Default transformation for images
Source§

fn walk_transform_code_block(&mut self, code_block: CodeBlock) -> CodeBlock

Default transformation for code blocks
Source§

fn walk_transform_text(&mut self, text: String) -> String

Default transformation for text
Source§

fn walk_transform_footnote_definition( &mut self, footnote: FootnoteDefinition, ) -> FootnoteDefinition

Default transformation for footnote definitions
Source§

fn walk_transform_github_alert(&mut self, alert: GitHubAlert) -> GitHubAlert

Default transformation for GitHub alerts

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.