Skip to main content

ConversionOptionsUpdate

Struct ConversionOptionsUpdate 

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

Partial update for ConversionOptions.

This struct uses Option<T> to represent optional fields that can be selectively updated. Only specified fields (Some values) will override existing options; None values leave the corresponding fields unchanged when applied via ConversionOptions::apply_update.

Fields§

§heading_style: Option<HeadingStyle>

Optional heading style override (Underlined, Atx, AtxClosed)

§list_indent_type: Option<ListIndentType>

Optional list indentation type override (Spaces or Tabs)

§list_indent_width: Option<usize>

Optional list indentation width override in spaces

§bullets: Option<String>

Optional bullet characters override for unordered lists

§strong_em_symbol: Option<char>

Optional strong/emphasis symbol override (* or _)

§escape_asterisks: Option<bool>

Optional asterisk escaping override in text content

§escape_underscores: Option<bool>

Optional underscore escaping override in text content

§escape_misc: Option<bool>

Optional miscellaneous character escaping override (\ & < ` [ > ~ # = + | -)

§escape_ascii: Option<bool>

Optional ASCII punctuation escaping override (for spec compliance testing)

§code_language: Option<String>

Optional default code language override for fenced code blocks

§autolinks: Option<bool>

Optional autolinks syntax override for bare URLs

§default_title: Option<bool>

Optional default title element injection override

§br_in_tables: Option<bool>

Optional HTML
usage in tables override

§hocr_spatial_tables: Option<bool>

Optional spatial table reconstruction for hOCR documents override

§highlight_style: Option<HighlightStyle>

Optional highlight style override for elements

§extract_metadata: Option<bool>

Optional metadata extraction override (title, description, images, links)

§whitespace_mode: Option<WhitespaceMode>

Optional whitespace handling mode override (Normalized or Strict)

§strip_newlines: Option<bool>

Optional newline stripping override before processing

§wrap: Option<bool>

Optional automatic text wrapping override

§wrap_width: Option<usize>

Optional text wrapping width override in characters

§convert_as_inline: Option<bool>

Optional block-level to inline conversion override

§sub_symbol: Option<String>

Optional subscript symbol override

§sup_symbol: Option<String>

Optional superscript symbol override

§newline_style: Option<NewlineStyle>

Optional newline style override for markdown output

§code_block_style: Option<CodeBlockStyle>

Optional code block fence style override (Indented, Backticks, Tildes)

§keep_inline_images_in: Option<Vec<String>>

Optional context elements where images remain as markdown links override

§preprocessing: Option<PreprocessingOptionsUpdate>

Optional preprocessing options partial update

§encoding: Option<String>

Optional source document encoding override

§debug: Option<bool>

Optional debug mode override for diagnostic warnings

§strip_tags: Option<Vec<String>>

Optional HTML tags to strip override (extract text, no conversion)

§preserve_tags: Option<Vec<String>>

Optional HTML tags to preserve as-is override in output

§skip_images: Option<bool>

Optional skip images override

§output_format: Option<OutputFormat>

Optional output format override (Markdown or Djot)

Trait Implementations§

Source§

impl Clone for ConversionOptionsUpdate

Source§

fn clone(&self) -> ConversionOptionsUpdate

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 ConversionOptionsUpdate

Source§

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

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

impl Default for ConversionOptionsUpdate

Source§

fn default() -> ConversionOptionsUpdate

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

impl<'de> Deserialize<'de> for ConversionOptionsUpdate

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<ConversionOptionsUpdate> for ConversionOptions

Source§

fn from(update: ConversionOptionsUpdate) -> Self

Converts to this type from the input type.
Source§

impl Serialize for ConversionOptionsUpdate

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. 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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,