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
impl ConversionOptionsBuilder
Sourcepub const fn output_format(self, value: OutputFormat) -> Self
pub const fn output_format(self, value: OutputFormat) -> Self
Set the value.
Sourcepub const fn include_document_structure(self, value: bool) -> Self
pub const fn include_document_structure(self, value: bool) -> Self
Set the value.
Sourcepub const fn extract_metadata(self, value: bool) -> Self
pub const fn extract_metadata(self, value: bool) -> Self
Set the value.
Sourcepub const fn extract_images(self, value: bool) -> Self
pub const fn extract_images(self, value: bool) -> Self
Set the value.
Sourcepub const fn heading_style(self, value: HeadingStyle) -> Self
pub const fn heading_style(self, value: HeadingStyle) -> Self
Set the value.
Sourcepub const fn list_indent_type(self, value: ListIndentType) -> Self
pub const fn list_indent_type(self, value: ListIndentType) -> Self
Set the value.
Sourcepub const fn list_indent_width(self, value: usize) -> Self
pub const fn list_indent_width(self, value: usize) -> Self
Set the value.
Sourcepub const fn strong_em_symbol(self, value: char) -> Self
pub const fn strong_em_symbol(self, value: char) -> Self
Set the value.
Sourcepub const fn code_block_style(self, value: CodeBlockStyle) -> Self
pub const fn code_block_style(self, value: CodeBlockStyle) -> Self
Set the value.
Sourcepub const fn newline_style(self, value: NewlineStyle) -> Self
pub const fn newline_style(self, value: NewlineStyle) -> Self
Set the value.
Sourcepub const fn highlight_style(self, value: HighlightStyle) -> Self
pub const fn highlight_style(self, value: HighlightStyle) -> Self
Set the value.
Sourcepub fn code_language(self, value: impl Into<String>) -> Self
pub fn code_language(self, value: impl Into<String>) -> Self
Set the value.
Sourcepub const fn link_style(self, value: LinkStyle) -> Self
pub const fn link_style(self, value: LinkStyle) -> Self
Set the value.
Sourcepub const fn default_title(self, value: bool) -> Self
pub const fn default_title(self, value: bool) -> Self
Set the value.
Sourcepub const fn br_in_tables(self, value: bool) -> Self
pub const fn br_in_tables(self, value: bool) -> Self
Set the value.
Sourcepub const fn compact_tables(self, value: bool) -> Self
pub const fn compact_tables(self, value: bool) -> Self
Set the value.
Sourcepub fn sub_symbol(self, value: impl Into<String>) -> Self
pub fn sub_symbol(self, value: impl Into<String>) -> Self
Set the value.
Sourcepub fn sup_symbol(self, value: impl Into<String>) -> Self
pub fn sup_symbol(self, value: impl Into<String>) -> Self
Set the value.
Sourcepub const fn escape_asterisks(self, value: bool) -> Self
pub const fn escape_asterisks(self, value: bool) -> Self
Set the value.
Sourcepub const fn escape_underscores(self, value: bool) -> Self
pub const fn escape_underscores(self, value: bool) -> Self
Set the value.
Sourcepub const fn escape_misc(self, value: bool) -> Self
pub const fn escape_misc(self, value: bool) -> Self
Set the value.
Sourcepub const fn escape_ascii(self, value: bool) -> Self
pub const fn escape_ascii(self, value: bool) -> Self
Set the value.
Sourcepub const fn whitespace_mode(self, value: WhitespaceMode) -> Self
pub const fn whitespace_mode(self, value: WhitespaceMode) -> Self
Set the value.
Sourcepub const fn strip_newlines(self, value: bool) -> Self
pub const fn strip_newlines(self, value: bool) -> Self
Set the value.
Sourcepub const fn wrap_width(self, value: usize) -> Self
pub const fn wrap_width(self, value: usize) -> Self
Set the value.
Sourcepub const fn convert_as_inline(self, value: bool) -> Self
pub const fn convert_as_inline(self, value: bool) -> Self
Set the value.
Sourcepub const fn skip_images(self, value: bool) -> Self
pub const fn skip_images(self, value: bool) -> Self
Set the value.
Sourcepub const fn url_escape_style(self, value: UrlEscapeStyle) -> Self
pub const fn url_escape_style(self, value: UrlEscapeStyle) -> Self
Set the value.
Set the list of HTML tag names whose content is stripped from output.
Set the list of HTML tag names that are preserved verbatim in output.
Sourcepub fn keep_inline_images_in(self, tags: Vec<String>) -> Self
pub fn keep_inline_images_in(self, tags: Vec<String>) -> Self
Set the list of HTML tag names whose <img> children are kept inline.
Sourcepub const fn max_image_size(self, value: u64) -> Self
pub const fn max_image_size(self, value: u64) -> Self
Set the value.
Sourcepub const fn capture_svg(self, value: bool) -> Self
pub const fn capture_svg(self, value: bool) -> Self
Set the value.
Sourcepub const fn infer_dimensions(self, value: bool) -> Self
pub const fn infer_dimensions(self, value: bool) -> Self
Set the value.
Sourcepub fn exclude_selectors(self, selectors: Vec<String>) -> Self
pub fn exclude_selectors(self, selectors: Vec<String>) -> Self
Set the list of CSS selectors for elements to exclude entirely from output.
Sourcepub const fn preprocessing(self, preprocessing: PreprocessingOptions) -> Self
pub const fn preprocessing(self, preprocessing: PreprocessingOptions) -> Self
Set the pre-processing options applied to the HTML before conversion.
Sourcepub const fn tier_strategy(self, value: TierStrategy) -> Self
pub const fn tier_strategy(self, value: TierStrategy) -> Self
Set the value.
Sourcepub fn build(self) -> ConversionOptions
pub fn build(self) -> ConversionOptions
Build the final ConversionOptions.
Trait Implementations§
Source§impl Clone for ConversionOptionsBuilder
impl Clone for ConversionOptionsBuilder
Source§fn clone(&self) -> ConversionOptionsBuilder
fn clone(&self) -> ConversionOptionsBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more