pub struct Config { /* private fields */ }Implementations§
Source§impl Config
impl Config
Sourcepub fn with_width(self, width: usize) -> Self
pub fn with_width(self, width: usize) -> Self
Render document with a given width in characters.
Sourcepub fn with_spaces_before_list_item(self, spaces: usize) -> Self
pub fn with_spaces_before_list_item(self, spaces: usize) -> Self
Sets the number of spaces to insert before each list item when rendering the AST to Markdown.
The default is 1 space. According to the GitHub Flavored Markdown specification, between 0 and 3 spaces before a list marker are allowed: https://github.github.com/gfm/#lists
§Parameters
spaces: the number of spaces to insert before each list item (valid range: 0..=3).
§Returns
A new printer config instance with spaces_before_list_item set to the specified value.
Sourcepub fn with_empty_line_before_list(self, tight: bool) -> Self
pub fn with_empty_line_before_list(self, tight: bool) -> Self
Sets whether to add an empty line before lists.
The default is true, which means that lists are preceded by an empty line.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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