pub struct DiagramFilter { /* private fields */ }
Expand description

Convert inline diagram markup as images for Pandoc.

This acts a filter on the Pandoc Abstract Syntax Tree (AST), to modify it so that any inline markup for diagrams are rendered as SVG images. The library is meant to be used with the pandoc_ast::filter function.

Filtering may fail. Because of the API constrain imposed by pandoc_ast::filter, this library doesn’t return a Result. Instead, it collects any errors and lets the caller query for them after the filtering is done (see the errors method). All errors are always rendered as text in the document as well, but that requires a human to read the document to spot any errors.

Implementations

Create a new filter.

Process a parsed document to convert inline diagram markup into SVG. This method is suitable to be passed to pandoc_ast::filter as the filter function argument.

Return any errors that occurred during the filtering process. The caller can decide how to report them to the user in a suitable way.

Set the name by which to invoke Graphviz dot program. The default is “dot”.

Set the name by which to invoke the Java runtime, for PlantUML. The default is “java”.

Set the location of the PlantUML jar (Java bytecode archive). The default is “/usr/share/plantuml/plantuml.jar”.

Set the maximum width, in characters, of the roadmap text nodes. The default is 50.

Trait Implementations

Formats the value using the given formatter. Read more

Create a filter with default settings.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.