#[non_exhaustive]pub struct Options { /* private fields */ }Expand description
Configuration options for the converter.
Use Default::default() for sensible CommonMark defaults, then
override individual fields with the provided setter methods:
use h2m::Options;
let opts = Options::default()
.with_heading_style(h2m::HeadingStyle::Setext)
.with_bullet_marker(h2m::BulletMarker::Asterisk);Implementations§
Source§impl Options
impl Options
Sourcepub const fn heading_style(&self) -> HeadingStyle
pub const fn heading_style(&self) -> HeadingStyle
Returns the heading rendering style.
Sourcepub const fn bullet_marker(&self) -> BulletMarker
pub const fn bullet_marker(&self) -> BulletMarker
Returns the bullet character for unordered lists.
Sourcepub const fn code_block_style(&self) -> CodeBlockStyle
pub const fn code_block_style(&self) -> CodeBlockStyle
Returns the code block rendering style.
Sourcepub const fn em_delimiter(&self) -> EmDelimiter
pub const fn em_delimiter(&self) -> EmDelimiter
Returns the delimiter for emphasis (italic) text.
Sourcepub const fn strong_delimiter(&self) -> StrongDelimiter
pub const fn strong_delimiter(&self) -> StrongDelimiter
Returns the delimiter for strong emphasis (bold) text.
Sourcepub const fn horizontal_rule(&self) -> HorizontalRule
pub const fn horizontal_rule(&self) -> HorizontalRule
Returns the horizontal rule style.
Sourcepub const fn escape_mode(&self) -> EscapeMode
pub const fn escape_mode(&self) -> EscapeMode
Returns the escape mode for markdown special characters.
Sourcepub const fn link_style(&self) -> LinkStyle
pub const fn link_style(&self) -> LinkStyle
Returns the link rendering style.
Sourcepub const fn link_reference_style(&self) -> LinkReferenceStyle
pub const fn link_reference_style(&self) -> LinkReferenceStyle
Returns the reference-style link identifier format.
Sourcepub const fn with_heading_style(self, style: HeadingStyle) -> Self
pub const fn with_heading_style(self, style: HeadingStyle) -> Self
Sets the heading rendering style.
Sourcepub const fn with_bullet_marker(self, marker: BulletMarker) -> Self
pub const fn with_bullet_marker(self, marker: BulletMarker) -> Self
Sets the bullet character for unordered lists.
Sourcepub const fn with_code_block_style(self, style: CodeBlockStyle) -> Self
pub const fn with_code_block_style(self, style: CodeBlockStyle) -> Self
Sets the code block rendering style.
Sourcepub const fn with_fence(self, fence: Fence) -> Self
pub const fn with_fence(self, fence: Fence) -> Self
Sets the fence character for fenced code blocks.
Sourcepub const fn with_em_delimiter(self, delim: EmDelimiter) -> Self
pub const fn with_em_delimiter(self, delim: EmDelimiter) -> Self
Sets the delimiter for emphasis (italic) text.
Sourcepub const fn with_strong_delimiter(self, delim: StrongDelimiter) -> Self
pub const fn with_strong_delimiter(self, delim: StrongDelimiter) -> Self
Sets the delimiter for strong emphasis (bold) text.
Sourcepub const fn with_horizontal_rule(self, rule: HorizontalRule) -> Self
pub const fn with_horizontal_rule(self, rule: HorizontalRule) -> Self
Sets the horizontal rule style.
Sourcepub const fn with_escape_mode(self, mode: EscapeMode) -> Self
pub const fn with_escape_mode(self, mode: EscapeMode) -> Self
Sets the escape mode for markdown special characters.
Sourcepub const fn with_link_style(self, style: LinkStyle) -> Self
pub const fn with_link_style(self, style: LinkStyle) -> Self
Sets the link rendering style.
Sourcepub const fn with_link_reference_style(self, style: LinkReferenceStyle) -> Self
pub const fn with_link_reference_style(self, style: LinkReferenceStyle) -> Self
Sets the reference-style link identifier format.