Struct cmarkfmt::Formatter

source ·
pub struct Formatter<'a> { /* private fields */ }
Expand description

A Formatter is needed to format markdown. It is created and customized as needed using the with_* methods.

Once created, the format_cmark or format_cmark_writer methods can be used.

Implementations§

Format markdown, returning the formatted result as a String.

Format markdown, writing the result to the provided Writer.

Sets the Formatters code formatter function. By default, code blocks are not formatted.

Sets the blockquote string. Default: “>”.

Sets the emphasis string. Default: “_”.

Sets the unordered list string. Default: “-”.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.