pub struct WriterOptions {
pub strict: bool,
pub hard_break_spaces: bool,
pub indent_spaces: usize,
pub list_marker: char,
pub thematic_break_char: char,
pub emphasis_char: char,
pub strong_char: char,
pub escape_special_chars: bool,
pub trim_paragraph_trailing_hard_breaks: bool,
pub html_writer_options: Option<HtmlWriterOptions>,
}Expand description
CommonMark formatting options
Fields§
§strict: boolWhether to enable strict mode (strictly following CommonMark specification)
hard_break_spaces: boolHard break mode (true uses two spaces followed by a newline, false uses backslash followed by a newline)
indent_spaces: usizeNumber of spaces to use for indentation levels
list_marker: charCharacter to use for unordered list markers (-, +, or *)
thematic_break_char: charCharacter to use for thematic breaks (-, *, or _)
emphasis_char: charCharacter to use for emphasis (_, or *)
strong_char: charCharacter to use for strong emphasis (_, or *)
escape_special_chars: boolWhether to escape special characters in text content
trim_paragraph_trailing_hard_breaks: boolWhether to trim trailing hard breaks from paragraphs
html_writer_options: Option<HtmlWriterOptions>HTML writer options for rendering HtmlElement nodes If None, options will be automatically derived from CommonMark options
Implementations§
Source§impl WriterOptions
impl WriterOptions
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
Trait Implementations§
Source§impl Clone for WriterOptions
impl Clone for WriterOptions
Source§fn clone(&self) -> WriterOptions
fn clone(&self) -> WriterOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WriterOptions
impl Debug for WriterOptions
Auto Trait Implementations§
impl Freeze for WriterOptions
impl RefUnwindSafe for WriterOptions
impl Send for WriterOptions
impl Sync for WriterOptions
impl Unpin for WriterOptions
impl UnwindSafe for WriterOptions
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