Skip to main content

ConversionOptionsBuilder

Struct ConversionOptionsBuilder 

Source
pub struct ConversionOptionsBuilder(/* private fields */);
Expand description

Builder for ConversionOptions.

All fields start with default values. Call .build() to produce the final options.

Implementations§

Source§

impl ConversionOptionsBuilder

Source

pub const fn output_format(self, value: OutputFormat) -> Self

Set the value.

Source

pub const fn include_document_structure(self, value: bool) -> Self

Set the value.

Source

pub const fn extract_metadata(self, value: bool) -> Self

Set the value.

Source

pub const fn extract_images(self, value: bool) -> Self

Set the value.

Source

pub const fn heading_style(self, value: HeadingStyle) -> Self

Set the value.

Source

pub const fn list_indent_type(self, value: ListIndentType) -> Self

Set the value.

Source

pub const fn list_indent_width(self, value: usize) -> Self

Set the value.

Source

pub fn bullets(self, value: impl Into<String>) -> Self

Set the value.

Source

pub const fn strong_em_symbol(self, value: char) -> Self

Set the value.

Source

pub const fn code_block_style(self, value: CodeBlockStyle) -> Self

Set the value.

Source

pub const fn newline_style(self, value: NewlineStyle) -> Self

Set the value.

Source

pub const fn highlight_style(self, value: HighlightStyle) -> Self

Set the value.

Source

pub fn code_language(self, value: impl Into<String>) -> Self

Set the value.

Set the value.

Set the value.

Source

pub const fn default_title(self, value: bool) -> Self

Set the value.

Source

pub const fn br_in_tables(self, value: bool) -> Self

Set the value.

Source

pub const fn compact_tables(self, value: bool) -> Self

Set the value.

Source

pub fn sub_symbol(self, value: impl Into<String>) -> Self

Set the value.

Source

pub fn sup_symbol(self, value: impl Into<String>) -> Self

Set the value.

Source

pub const fn escape_asterisks(self, value: bool) -> Self

Set the value.

Source

pub const fn escape_underscores(self, value: bool) -> Self

Set the value.

Source

pub const fn escape_misc(self, value: bool) -> Self

Set the value.

Source

pub const fn escape_ascii(self, value: bool) -> Self

Set the value.

Source

pub const fn whitespace_mode(self, value: WhitespaceMode) -> Self

Set the value.

Source

pub const fn strip_newlines(self, value: bool) -> Self

Set the value.

Source

pub const fn wrap(self, value: bool) -> Self

Set the value.

Source

pub const fn wrap_width(self, value: usize) -> Self

Set the value.

Source

pub const fn convert_as_inline(self, value: bool) -> Self

Set the value.

Source

pub const fn skip_images(self, value: bool) -> Self

Set the value.

Source

pub const fn url_escape_style(self, value: UrlEscapeStyle) -> Self

Set the value.

Source

pub fn strip_tags(self, tags: Vec<String>) -> Self

Set the list of HTML tag names whose content is stripped from output.

Source

pub fn preserve_tags(self, tags: Vec<String>) -> Self

Set the list of HTML tag names that are preserved verbatim in output.

Source

pub fn keep_inline_images_in(self, tags: Vec<String>) -> Self

Set the list of HTML tag names whose <img> children are kept inline.

Source

pub const fn max_image_size(self, value: u64) -> Self

Set the value.

Source

pub const fn capture_svg(self, value: bool) -> Self

Set the value.

Source

pub const fn infer_dimensions(self, value: bool) -> Self

Set the value.

Source

pub const fn max_depth(self, value: Option<usize>) -> Self

Set the value.

Source

pub fn exclude_selectors(self, selectors: Vec<String>) -> Self

Set the list of CSS selectors for elements to exclude entirely from output.

Source

pub const fn preprocessing(self, preprocessing: PreprocessingOptions) -> Self

Set the pre-processing options applied to the HTML before conversion.

Source

pub fn encoding(self, value: impl Into<String>) -> Self

Set the value.

Source

pub const fn debug(self, value: bool) -> Self

Set the value.

Source

pub const fn tier_strategy(self, value: TierStrategy) -> Self

Set the value.

Source

pub fn build(self) -> ConversionOptions

Build the final ConversionOptions.

Trait Implementations§

Source§

impl Clone for ConversionOptionsBuilder

Source§

fn clone(&self) -> ConversionOptionsBuilder

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ConversionOptionsBuilder

Source§

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

Formats the value using the given formatter. 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.