Skip to main content

MarkdownToHtml

Trait MarkdownToHtml 

Source
pub trait MarkdownToHtml<W: TextWrite = String> {
    // Required method
    fn markdown_to_html(&self, out: &mut W, source: &str) -> Result<()>;
}
Expand description

Trait for converting Markdown to HTML.

§Errors

Parsing phase will never fail, so the only possible errors are I/O errors during rendering.

Required Methods§

Source

fn markdown_to_html(&self, out: &mut W, source: &str) -> Result<()>

Converts the given Markdown source to HTML and writes it to the output.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<W: TextWrite, F> MarkdownToHtml<W> for F
where F: Fn(&mut W, &str) -> Result<()>,