pub struct RenderOption {
    pub link_handler: fn(_: &str) -> String,
    pub header_anchor: bool,
    pub parse_metadata: bool,
    pub javascript: bool,
    pub class_prefix: String,
    pub xml: bool,
}

Fields

link_handler: fn(_: &str) -> String

when rendering [Lable](Link) to html, Link goes through this function. The link first goes through the default handler then the given function. If you don’t give any function, it’ll only go through the default handler. The default handler does two things

  • reject links with invalid characters
  • normalize anchors
  • make alphabets lowercase
  • replace whitespaces with dashes
header_anchor: bool

give id attributes to header tags

parse_metadata: booljavascript: bool

Javascript is required to render collapsible tables and math formulas. If this option is true, the engine will add javascript codes when needed. If you want to use your own script, turn this option off.

class_prefix: String

It prefixes all the html classes.

xml: bool

If you want the output to be a well-formed xml, turn it on. It’s not a polyglot markup, though.

Implementations

it’s used internally by the engine

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. 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.