pub struct MdWriterOptionsBuilder { /* private fields */ }Expand description
Builder for MdWriterOptions.
Implementations§
Source§impl MdWriterOptionsBuilder
impl MdWriterOptionsBuilder
Sourcepub fn link_reference_placement(
&mut self,
value: ReferencePlacement,
) -> &mut Self
pub fn link_reference_placement( &mut self, value: ReferencePlacement, ) -> &mut Self
Where to put link references (for non-inline links).
Sourcepub fn footnote_reference_placement(
&mut self,
value: ReferencePlacement,
) -> &mut Self
pub fn footnote_reference_placement( &mut self, value: ReferencePlacement, ) -> &mut Self
Where to put footnote references.
Sourcepub fn inline_options(&mut self, value: InlineElemOptions) -> &mut Self
pub fn inline_options(&mut self, value: InlineElemOptions) -> &mut Self
Inline Markdown options.
Sourcepub fn include_thematic_breaks(&mut self, value: bool) -> &mut Self
pub fn include_thematic_breaks(&mut self, value: bool) -> &mut Self
Whether to include thematic breaks between top-level elements.
If true, each top-level element will be separated by a thematic break:
-----Note that “top-level” refers to the nodes you pass into MdWriter::write, not to what might
otherwise look “top level” to a user. For example, if you were to construct an MdElem::Section with depth 2,
and within its body another Section with depth 1, only the outer depth-2 Section would count as top-level
for these breaks.
Sourcepub fn text_width(&mut self, value: Option<usize>) -> &mut Self
pub fn text_width(&mut self, value: Option<usize>) -> &mut Self
Optional text wrapping.
Code blocks will never wrap, and certain inline elements (like URLs) will be treated as atomic: if any part of them wraps, the whole thing will wrap, and if it starts a line then it will never wrap.
For example:
┌────────────────────────────────┐ │This is a long line that will │ │wrap. But │ │[this](https://example.com/will/not/wrap) |because it's a URL. │ └────────────────────────────────┘
Sourcepub fn build(&self) -> Result<MdWriterOptions, MdWriterOptionsBuilderError>
pub fn build(&self) -> Result<MdWriterOptions, MdWriterOptionsBuilderError>
Trait Implementations§
Source§impl Clone for MdWriterOptionsBuilder
impl Clone for MdWriterOptionsBuilder
Source§fn clone(&self) -> MdWriterOptionsBuilder
fn clone(&self) -> MdWriterOptionsBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more