pub struct Options {
pub nfkc: bool,
pub strip_zero_width: bool,
pub strip_control: bool,
pub collapse_whitespace: bool,
pub trim: bool,
pub ascii_punctuation: bool,
pub strip_emoji: bool,
pub ascii_only: bool,
}Expand description
Cleanup pipeline configuration.
Fields§
§nfkc: boolApply NFKC unicode normalization.
strip_zero_width: boolStrip zero-width code points (ZWSP, ZWJ, ZWNJ, BOM, RTL/LTR marks).
strip_control: boolStrip control characters (C0 + C1) except \n and \t.
collapse_whitespace: boolCollapse runs of whitespace to a single space.
trim: boolTrim leading and trailing whitespace.
ascii_punctuation: boolReplace common smart punctuation (curly quotes, em/en dash, ellipsis) with plain ASCII equivalents.
strip_emoji: boolStrip emoji and pictograph code points.
ascii_only: boolDrop any non-ASCII character. Applied after ascii_punctuation so
smart punctuation gets converted, not deleted.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Options
impl<'de> Deserialize<'de> for Options
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
impl Copy for Options
impl Eq for Options
impl StructuralPartialEq for Options
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnsafeUnpin for Options
impl UnwindSafe for Options
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more