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

Fields

link_handler: fn(_: &str) -> Stringheader_anchor: boolparse_metadata: booljavascript_collapsible_tables: booljavascript_copy_buttons: boolclass_prefix: Stringxml: bool

Implementations

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

give id attributes to header tags

It prefixes all the html classes.

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

It embeds javascript for collapsible tables in a <script>.

It embeds javascript for copy buttons of fenced code blocks in a <script>.

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.