pub struct PreprocessingOptions {
pub enabled: bool,
pub preset: PreprocessingPreset,
pub remove_navigation: bool,
pub remove_forms: bool,
}Expand description
HTML preprocessing options for document cleanup before conversion.
Fields§
§enabled: boolEnable HTML preprocessing globally
preset: PreprocessingPresetPreprocessing preset level (Minimal, Standard, Aggressive)
Remove navigation elements (nav, breadcrumbs, menus, sidebars)
remove_forms: boolRemove form elements (forms, inputs, buttons, etc.)
Implementations§
Source§impl PreprocessingOptions
impl PreprocessingOptions
Sourcepub const fn apply_update(&mut self, update: PreprocessingOptionsUpdate)
pub const fn apply_update(&mut self, update: PreprocessingOptionsUpdate)
Apply a partial update to these preprocessing options.
Any specified fields in the update will override the current values. Unspecified fields (None) are left unchanged.
§Arguments
update- Partial preprocessing options update
Sourcepub fn from_update(update: PreprocessingOptionsUpdate) -> Self
pub fn from_update(update: PreprocessingOptionsUpdate) -> Self
Create new preprocessing options from a partial update.
Creates a new PreprocessingOptions struct with defaults, then applies the update.
Fields not specified in the update keep their default values.
§Arguments
update- Partial preprocessing options update
§Returns
New PreprocessingOptions with specified updates applied to defaults
Trait Implementations§
Source§impl Clone for PreprocessingOptions
impl Clone for PreprocessingOptions
Source§fn clone(&self) -> PreprocessingOptions
fn clone(&self) -> PreprocessingOptions
Returns a duplicate of the value. Read more
1.0.0 · 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 PreprocessingOptions
impl Debug for PreprocessingOptions
Source§impl Default for PreprocessingOptions
impl Default for PreprocessingOptions
Source§impl<'de> Deserialize<'de> for PreprocessingOptions
impl<'de> Deserialize<'de> for PreprocessingOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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<PreprocessingOptionsUpdate> for PreprocessingOptions
impl From<PreprocessingOptionsUpdate> for PreprocessingOptions
Source§fn from(update: PreprocessingOptionsUpdate) -> Self
fn from(update: PreprocessingOptionsUpdate) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PreprocessingOptions
impl RefUnwindSafe for PreprocessingOptions
impl Send for PreprocessingOptions
impl Sync for PreprocessingOptions
impl Unpin for PreprocessingOptions
impl UnwindSafe for PreprocessingOptions
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