pub trait PygmentizeFormatter: Sized {
    const SHORT_NAME: &'static str;

    // Required method
    fn options_str(&self) -> Option<Cow<'_, str>>;

    // Provided method
    fn highlight(
        &self,
        code: impl AsRef<str>,
        lang: Option<&str>
    ) -> Result<String, PygmentizeError> { ... }
}
Expand description

Want to implement a formatter or add unsupported options?

See https://pygments.org/docs/formatters/ for available formatters.

Required Associated Constants§

source

const SHORT_NAME: &'static str

Required Methods§

source

fn options_str(&self) -> Option<Cow<'_, str>>

Provided Methods§

source

fn highlight( &self, code: impl AsRef<str>, lang: Option<&str> ) -> Result<String, PygmentizeError>

Implementors§