pub struct MdWriterOptions {
pub link_reference_placement: ReferencePlacement,
pub footnote_reference_placement: ReferencePlacement,
pub inline_options: InlineElemOptions,
pub include_thematic_breaks: bool,
pub text_width: Option<usize>,
}Fields§
§link_reference_placement: ReferencePlacementWhere to put link references (for non-inline links).
footnote_reference_placement: ReferencePlacementWhere to put footnote references.
inline_options: InlineElemOptionsInline Markdown options.
include_thematic_breaks: boolWhether 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.
text_width: Option<usize>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. │ └────────────────────────────────┘
Trait Implementations§
Source§impl Clone for MdWriterOptions
impl Clone for MdWriterOptions
Source§fn clone(&self) -> MdWriterOptions
fn clone(&self) -> MdWriterOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for MdWriterOptions
Source§impl Debug for MdWriterOptions
impl Debug for MdWriterOptions
Source§impl Default for MdWriterOptions
impl Default for MdWriterOptions
Source§fn default() -> MdWriterOptions
fn default() -> MdWriterOptions
impl Eq for MdWriterOptions
Source§impl From<&RunOptions> for MdWriterOptions
impl From<&RunOptions> for MdWriterOptions
Source§fn from(cli: &RunOptions) -> Self
fn from(cli: &RunOptions) -> Self
Source§impl Hash for MdWriterOptions
impl Hash for MdWriterOptions
Source§impl Ord for MdWriterOptions
impl Ord for MdWriterOptions
Source§fn cmp(&self, other: &MdWriterOptions) -> Ordering
fn cmp(&self, other: &MdWriterOptions) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for MdWriterOptions
impl PartialEq for MdWriterOptions
Source§fn eq(&self, other: &MdWriterOptions) -> bool
fn eq(&self, other: &MdWriterOptions) -> bool
self and other values to be equal, and is used by ==.