pub struct CleaningOptionsBuilder { /* private fields */ }Expand description
Builder for CleaningOptions.
Implementations§
Source§impl CleaningOptionsBuilder
impl CleaningOptionsBuilder
Add tags to remove (including children).
Add tags to strip (keep children).
Sourcepub fn remove_selectors(self, selectors: &[&str]) -> Self
pub fn remove_selectors(self, selectors: &[&str]) -> Self
Add CSS selectors to remove.
Sourcepub fn prune_empty(self, enabled: bool) -> Self
pub fn prune_empty(self, enabled: bool) -> Self
Enable empty element pruning.
Set tags to consider as empty for pruning.
Sourcepub fn normalize_whitespace(self, enabled: bool) -> Self
pub fn normalize_whitespace(self, enabled: bool) -> Self
Enable whitespace normalization.
Sourcepub fn strip_attributes(self, enabled: bool) -> Self
pub fn strip_attributes(self, enabled: bool) -> Self
Enable attribute stripping.
Sourcepub fn preserve_attributes(self, attrs: &[&str]) -> Self
pub fn preserve_attributes(self, attrs: &[&str]) -> Self
Set preserved attributes (when strip_attributes is enabled).
Sourcepub fn build(self) -> CleaningOptions
pub fn build(self) -> CleaningOptions
Build the CleaningOptions.
Trait Implementations§
Source§impl Clone for CleaningOptionsBuilder
impl Clone for CleaningOptionsBuilder
Source§fn clone(&self) -> CleaningOptionsBuilder
fn clone(&self) -> CleaningOptionsBuilder
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 CleaningOptionsBuilder
impl Debug for CleaningOptionsBuilder
Source§impl Default for CleaningOptionsBuilder
impl Default for CleaningOptionsBuilder
Source§fn default() -> CleaningOptionsBuilder
fn default() -> CleaningOptionsBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CleaningOptionsBuilder
impl RefUnwindSafe for CleaningOptionsBuilder
impl Send for CleaningOptionsBuilder
impl Sync for CleaningOptionsBuilder
impl Unpin for CleaningOptionsBuilder
impl UnsafeUnpin for CleaningOptionsBuilder
impl UnwindSafe for CleaningOptionsBuilder
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