pub struct CleaningOptions {Show 16 fields
pub remove_hidden: bool,
pub remove_trailing_whitespace: bool,
pub normalize_spaces: bool,
pub normalize_dashes: bool,
pub normalize_quotes: bool,
pub normalize_other: bool,
pub keyboard_only: bool,
pub extended_keyboard: bool,
pub emoji_policy: EmojiPolicy,
pub non_ascii_policy: NonAsciiPolicy,
pub preserve_joiners: bool,
pub remove_control_chars: bool,
pub collapse_whitespace: bool,
pub normalize_line_endings: Option<LineEndingStyle>,
pub unicode_normalization: UnicodeNormalizationMode,
pub strip_bidi_controls: bool,
}Expand description
Configuration for cleaning.
Fields§
§remove_trailing_whitespace: bool§normalize_spaces: bool§normalize_dashes: bool§normalize_quotes: bool§normalize_other: bool§keyboard_only: bool§extended_keyboard: bool§emoji_policy: EmojiPolicy§non_ascii_policy: NonAsciiPolicy§preserve_joiners: bool§remove_control_chars: bool§collapse_whitespace: bool§normalize_line_endings: Option<LineEndingStyle>§unicode_normalization: UnicodeNormalizationMode§strip_bidi_controls: boolImplementations§
Source§impl CleaningOptions
impl CleaningOptions
Sourcepub fn builder() -> CleaningOptionsBuilder
pub fn builder() -> CleaningOptionsBuilder
Start a new CleaningOptionsBuilder with default values.
§Returns
A builder initialized from CleaningOptions::default.
Sourcepub fn minimal() -> Self
pub fn minimal() -> Self
Minimal preset: only removes hidden/invisible chars.
§Returns
A conservative preset that performs minimal transformations.
Sourcepub fn humanize() -> Self
pub fn humanize() -> Self
Humanize preset for AI/LLM-ish text.
§Returns
A preset tuned for typographic normalization and whitespace cleanup.
Sourcepub fn aggressive() -> Self
pub fn aggressive() -> Self
Trait Implementations§
Source§impl Clone for CleaningOptions
impl Clone for CleaningOptions
Source§fn clone(&self) -> CleaningOptions
fn clone(&self) -> CleaningOptions
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 CleaningOptions
impl Debug for CleaningOptions
Source§impl Default for CleaningOptions
impl Default for CleaningOptions
Source§impl PartialEq for CleaningOptions
impl PartialEq for CleaningOptions
impl Eq for CleaningOptions
impl StructuralPartialEq for CleaningOptions
Auto Trait Implementations§
impl Freeze for CleaningOptions
impl RefUnwindSafe for CleaningOptions
impl Send for CleaningOptions
impl Sync for CleaningOptions
impl Unpin for CleaningOptions
impl UnsafeUnpin for CleaningOptions
impl UnwindSafe for CleaningOptions
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