pub struct TranslatorConfig {
pub prefix: Option<String>,
pub postfix: Option<String>,
pub content: Option<String>,
pub recurse: Option<bool>,
pub surrounding_newlines: SurroundingNewlines,
pub ignore: bool,
pub no_escape: bool,
pub space_if_repeating_char: bool,
pub preserve_if_empty: bool,
pub preserve_whitespace: bool,
}Expand description
Re-exported translator override types used by HtmlToMarkdown::with_options_and_translators.
Static translator configuration for one or more tags.
Fields§
§prefix: Option<String>Prefix written before translated content.
postfix: Option<String>Postfix written after translated content.
content: Option<String>Fixed content for the node.
recurse: Option<bool>Whether to recurse into children.
surrounding_newlines: SurroundingNewlinesSurrounding newline policy.
ignore: boolIgnore this node entirely.
no_escape: boolDisable escaping for this node.
space_if_repeating_char: boolInsert a space if the next content repeats the current trailing delimiter char.
preserve_if_empty: boolPreserve empty nodes during optimization.
preserve_whitespace: boolPreserve whitespace exactly.
Trait Implementations§
Source§impl Clone for TranslatorConfig
impl Clone for TranslatorConfig
Source§fn clone(&self) -> TranslatorConfig
fn clone(&self) -> TranslatorConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TranslatorConfig
impl Debug for TranslatorConfig
Source§impl Default for TranslatorConfig
impl Default for TranslatorConfig
Source§fn default() -> TranslatorConfig
fn default() -> TranslatorConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TranslatorConfig
impl RefUnwindSafe for TranslatorConfig
impl Send for TranslatorConfig
impl Sync for TranslatorConfig
impl Unpin for TranslatorConfig
impl UnsafeUnpin for TranslatorConfig
impl UnwindSafe for TranslatorConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more