pub struct CleanOptions {
pub preserve_paragraphs: bool,
pub strip_markdown_artifacts: bool,
pub strip_invisible_chars: bool,
pub collapse_all_whitespace: bool,
}Expand description
Options for txt-cleaner operations.
Fields§
§preserve_paragraphs: boolWhen true, preserves paragraph structure by collapsing consecutive blank
lines to a single blank line (\n\n).
strip_markdown_artifacts: boolWhen true, remove common markdown/html artifacts from the edges of the text.
strip_invisible_chars: boolWhen true, remove invisible characters like BOM and zero-width spaces.
collapse_all_whitespace: boolWhen true, collapse all whitespace sequences to a single space.
Implementations§
Source§impl CleanOptions
impl CleanOptions
Sourcepub fn builder() -> CleanBuilder
pub fn builder() -> CleanBuilder
Create a new builder for CleanOptions.
Trait Implementations§
Source§impl Clone for CleanOptions
impl Clone for CleanOptions
Source§fn clone(&self) -> CleanOptions
fn clone(&self) -> CleanOptions
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 moreimpl Copy for CleanOptions
Source§impl Debug for CleanOptions
impl Debug for CleanOptions
Source§impl Default for CleanOptions
impl Default for CleanOptions
impl Eq for CleanOptions
Source§impl PartialEq for CleanOptions
impl PartialEq for CleanOptions
Source§fn eq(&self, other: &CleanOptions) -> bool
fn eq(&self, other: &CleanOptions) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CleanOptions
Auto Trait Implementations§
impl Freeze for CleanOptions
impl RefUnwindSafe for CleanOptions
impl Send for CleanOptions
impl Sync for CleanOptions
impl Unpin for CleanOptions
impl UnsafeUnpin for CleanOptions
impl UnwindSafe for CleanOptions
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