MarkdownParseExt

Trait MarkdownParseExt 

Source
pub trait MarkdownParseExt {
    type Error: Error;

    // Required method
    fn write_markdown(&mut self, md: &str) -> Result<(), Self::Error>;
}
Available on crate feature parse-markdown only.
Expand description

Contributes the write_markdown function to DocumentationWriters.

Required Associated Types§

Source

type Error: Error

This error wraps errors during markdown processing and io errors occurring during writing.

For all the standard DocumentationWriters it is MarkdownParseError<io::Error>.

Required Methods§

Source

fn write_markdown(&mut self, md: &str) -> Result<(), Self::Error>

Emit events corresponding to the given markdown.

§Examples
w.start_description()?;
w.write_markdown("*See also* <man:pcresyntax(3)>")?;
// equivalent to calling
w.emphasis("See also")?;
w.plain(" ")?;
w.link("", "man:pcresyntax(3)")?;
// this works on all writers.

Implementors§