pub struct WriterOptionsBuilder { /* private fields */ }Expand description
Builder for WriterOptions
Implementations§
Source§impl WriterOptionsBuilder
impl WriterOptionsBuilder
Sourcepub fn strict(self, strict: bool) -> Self
pub fn strict(self, strict: bool) -> Self
Set strict mode (whether to strictly follow CommonMark specification)
Sourcepub fn hard_break_spaces(self, hard_break_spaces: bool) -> Self
pub fn hard_break_spaces(self, hard_break_spaces: bool) -> Self
Set hard break mode (true uses two spaces followed by a newline, false uses backslash)
Sourcepub fn indent_spaces(self, indent_spaces: usize) -> Self
pub fn indent_spaces(self, indent_spaces: usize) -> Self
Set number of spaces for indentation
Sourcepub fn list_marker(self, marker: char) -> Self
pub fn list_marker(self, marker: char) -> Self
Set the marker character for unordered lists (-, +, or *)
Sourcepub fn escape_special_chars(self, escape: bool) -> Self
pub fn escape_special_chars(self, escape: bool) -> Self
Set whether to escape special characters in text content
Sourcepub fn trim_paragraph_trailing_hard_breaks(self, trim: bool) -> Self
pub fn trim_paragraph_trailing_hard_breaks(self, trim: bool) -> Self
Set whether to trim trailing hard breaks from paragraphs
Sourcepub fn thematic_break_char(self, char: char) -> Self
pub fn thematic_break_char(self, char: char) -> Self
Set the character for thematic breaks (-, *, or _)
Sourcepub fn emphasis_char(self, char: char) -> Self
pub fn emphasis_char(self, char: char) -> Self
Set the character for emphasis (_, or *)
Sourcepub fn strong_char(self, char: char) -> Self
pub fn strong_char(self, char: char) -> Self
Set the character for strong emphasis (_, or *)
Sourcepub fn html_writer_options(self, options: Option<HtmlWriterOptions>) -> Self
pub fn html_writer_options(self, options: Option<HtmlWriterOptions>) -> Self
Set custom HTML writer options for rendering HtmlElement nodes
Sourcepub fn build(self) -> WriterOptions
pub fn build(self) -> WriterOptions
Build the WriterOptions
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WriterOptionsBuilder
impl RefUnwindSafe for WriterOptionsBuilder
impl Send for WriterOptionsBuilder
impl Sync for WriterOptionsBuilder
impl Unpin for WriterOptionsBuilder
impl UnwindSafe for WriterOptionsBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more