ConversionOptions

Struct ConversionOptions 

Source
pub struct ConversionOptions {
Show 31 fields pub heading_style: HeadingStyle, pub list_indent_type: ListIndentType, pub list_indent_width: usize, pub bullets: String, pub strong_em_symbol: char, pub escape_asterisks: bool, pub escape_underscores: bool, pub escape_misc: bool, pub escape_ascii: bool, pub code_language: String, pub autolinks: bool, pub default_title: bool, pub br_in_tables: bool, pub hocr_spatial_tables: bool, pub highlight_style: HighlightStyle, pub extract_metadata: bool, pub whitespace_mode: WhitespaceMode, pub strip_newlines: bool, pub wrap: bool, pub wrap_width: usize, pub convert_as_inline: bool, pub sub_symbol: String, pub sup_symbol: String, pub newline_style: NewlineStyle, pub code_block_style: CodeBlockStyle, pub keep_inline_images_in: Vec<String>, pub preprocessing: PreprocessingOptions, pub encoding: String, pub debug: bool, pub strip_tags: Vec<String>, pub preserve_tags: Vec<String>,
}
Expand description

Main conversion options.

Fields§

§heading_style: HeadingStyle

Heading style

§list_indent_type: ListIndentType

List indentation type

§list_indent_width: usize

List indentation width (spaces)

§bullets: String

Bullet characters for unordered lists

§strong_em_symbol: char

Symbol for strong/emphasis (* or _)

§escape_asterisks: bool

Escape asterisks in text

§escape_underscores: bool

Escape underscores in text

§escape_misc: bool

Escape misc markdown characters

§escape_ascii: bool

Escape all ASCII punctuation (for CommonMark spec compliance tests)

§code_language: String

Default code language

§autolinks: bool

Use autolinks for bare URLs

§default_title: bool

Add default title if none exists

§br_in_tables: bool

Use
in tables instead of spaces

§hocr_spatial_tables: bool

Enable spatial table reconstruction in hOCR documents

§highlight_style: HighlightStyle

Highlight style for elements

§extract_metadata: bool

Extract metadata from HTML

§whitespace_mode: WhitespaceMode

Whitespace handling mode

§strip_newlines: bool

Strip newlines from HTML before processing

§wrap: bool

Enable text wrapping

§wrap_width: usize

Text wrap width

§convert_as_inline: bool

Treat block elements as inline

§sub_symbol: String

Subscript symbol

§sup_symbol: String

Superscript symbol

§newline_style: NewlineStyle

Newline style

§code_block_style: CodeBlockStyle

Code block style

§keep_inline_images_in: Vec<String>

Elements where images should remain as markdown (not converted to alt text)

§preprocessing: PreprocessingOptions

Preprocessing options

§encoding: String

Source encoding (informational)

§debug: bool

Enable debug mode with diagnostic warnings

§strip_tags: Vec<String>

List of HTML tags to strip (output only text content, no markdown conversion)

§preserve_tags: Vec<String>

List of HTML tags to preserve as-is in the output (keep original HTML) Useful for complex elements like tables that don’t convert well to Markdown

Trait Implementations§

Source§

impl Clone for ConversionOptions

Source§

fn clone(&self) -> ConversionOptions

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ConversionOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ConversionOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.